]> granicus.if.org Git - clang/commitdiff
Removed bogus assertions regard LValues binding to UnknownVal; they can
authorTed Kremenek <kremenek@apple.com>
Thu, 21 Feb 2008 19:15:37 +0000 (19:15 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 21 Feb 2008 19:15:37 +0000 (19:15 +0000)
do so implicitly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47447 91177308-0d34-0410-b5e6-96231b3b80d8

Analysis/GRExprEngine.cpp

index c326df549954d4edaad0965bda6d27b448b11d0a..16361c6d86a60462912339423f414f409c13706e 100644 (file)
@@ -685,8 +685,10 @@ void GRExprEngine::VisitUnaryOperator(UnaryOperator* U, NodeTy* Pred,
       LVal SubLV = cast<LVal>(SubV); 
       RVal V  = GetRVal(St, SubLV, U->getType());
       
-      // An LVal should never bind to UnknownVal.      
-      assert (!V.isUnknown());
+      if (V.isUnknown()) {
+        Dst.Add(N1);
+        continue;
+      }
 
       // Propagate uninitialized values.      
       if (V.isUninit()) {
@@ -925,8 +927,10 @@ void GRExprEngine::VisitBinaryOperator(BinaryOperator* B,
           
           // Propagate unknown values.
           
-          assert (!V.isUnknown() &&
-                  "An LVal should never bind to UnknownVal");
+          if (V.isUnknown()) {
+            Dst.Add(N2);
+            continue;
+          }
           
           if (RightV.isUnknown()) {
             St = SetRVal(SetRVal(St, LeftLV, RightV), B, RightV);