]> granicus.if.org Git - clang/commitdiff
Always blast through no-op casts when getting expr SVals.
authorZhongxing Xu <xuzhongxing@gmail.com>
Wed, 22 Dec 2010 07:40:30 +0000 (07:40 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Wed, 22 Dec 2010 07:40:30 +0000 (07:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122390 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Checker/Environment.cpp

index 954129883d6a0e0d38c9a684301eaa029c4a1efe..7bf2929161c9f5a815252bc85d2769e1a8725f58 100644 (file)
@@ -63,12 +63,7 @@ SVal Environment::getSVal(const Stmt *E, SValBuilder& svalBuilder) const {
         if (CT->isVoidType())
           return UnknownVal();
         if (C->getCastKind() == CK_NoOp) {
-          // If the no-op cast has value, use it. Should we always propagate
-          // values through all levels of no-op casts?
-          if (const SVal* X = ExprBindings.lookup(C))
-            return *X;
-          else
-            E = C->getSubExpr();
+          E = C->getSubExpr();
           continue;
         }
         break;