]> granicus.if.org Git - clang/commitdiff
Fixed bug in RemoveDeadBindings when performing the mark-and-sweep over the
authorTed Kremenek <kremenek@apple.com>
Mon, 25 Feb 2008 18:56:23 +0000 (18:56 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 25 Feb 2008 18:56:23 +0000 (18:56 +0000)
symbolic store: VarDecl's inserted into the sweep may not always bind to
anything; handle this special case just like bindings to uninitialized values.

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

Analysis/ValueState.cpp

index 3cbcd88d25b7ab793bdd6f235324ee1b0ce5ac40..75f719ae6a193dc4419c7fcf803ec2931401cc08 100644 (file)
@@ -95,11 +95,9 @@ ValueStateManager::RemoveDeadBindings(ValueState St, Stmt* Loc,
     
     if (V->getType()->isPointerType()) {
       
-      RVal X = GetRVal(St, lval::DeclVal(cast<VarDecl>(V)));
+      RVal X = GetRVal(St, lval::DeclVal(cast<VarDecl>(V)));      
       
-      assert (!X.isUnknown());
-      
-      if (X.isUninit())
+      if (X.isUnknownOrUninit())
         continue;
       
       LVal LV = cast<LVal>(X);