[cfe-commits] r47447 - /cfe/trunk/Analysis/GRExprEngine.cpp

Ted Kremenek kremenek at apple.com
Thu Feb 21 11:15:37 PST 2008


Author: kremenek
Date: Thu Feb 21 13:15:37 2008
New Revision: 47447

URL: http://llvm.org/viewvc/llvm-project?rev=47447&view=rev
Log:
Removed bogus assertions regard LValues binding to UnknownVal; they can
do so implicitly.

Modified:
    cfe/trunk/Analysis/GRExprEngine.cpp

Modified: cfe/trunk/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Analysis/GRExprEngine.cpp?rev=47447&r1=47446&r2=47447&view=diff

==============================================================================
--- cfe/trunk/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/Analysis/GRExprEngine.cpp Thu Feb 21 13:15:37 2008
@@ -685,8 +685,10 @@
       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 @@
           
           // 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);





More information about the cfe-commits mailing list