diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-02-25 18:56:23 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-02-25 18:56:23 +0000 |
commit | 29db75ceec7a6c726fc95245f9522a4dba72299a (patch) | |
tree | 72c2155334a76f0b8910a3972659ea25012b4522 /Analysis/ValueState.cpp | |
parent | 3c8d0c58dba7968810ebe5e1137e2f268a4e5d14 (diff) |
Fixed bug in RemoveDeadBindings when performing the mark-and-sweep over the
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
Diffstat (limited to 'Analysis/ValueState.cpp')
-rw-r--r-- | Analysis/ValueState.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Analysis/ValueState.cpp b/Analysis/ValueState.cpp index 3cbcd88d25..75f719ae6a 100644 --- a/Analysis/ValueState.cpp +++ b/Analysis/ValueState.cpp @@ -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); |