From a8d835abb81eb26850fa27738df0e42f12fae66a Mon Sep 17 00:00:00 2001
From: Zhongxing Xu <xuzhongxing@gmail.com>
Date: Wed, 22 Dec 2010 07:40:30 +0000
Subject: [PATCH] Always blast through no-op casts when getting expr SVals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122390 91177308-0d34-0410-b5e6-96231b3b80d8
---
 lib/Checker/Environment.cpp | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/lib/Checker/Environment.cpp b/lib/Checker/Environment.cpp
index 954129883d6..7bf2929161c 100644
--- a/lib/Checker/Environment.cpp
+++ b/lib/Checker/Environment.cpp
@@ -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;
-- 
GitLab