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 | eb079dc502c6939edd8b2082643e6cd948d30c2d (patch) | |
| tree | c142e3e1501b85dbafe8239d9ce3fce2aad82cc8 | |
| parent | 3866746569e46c5694074f88ad419bb34b8ca92b (diff) | |
| download | bcm5719-llvm-eb079dc502c6939edd8b2082643e6cd948d30c2d.tar.gz bcm5719-llvm-eb079dc502c6939edd8b2082643e6cd948d30c2d.zip | |
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.
llvm-svn: 47550
| -rw-r--r-- | clang/Analysis/ValueState.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/Analysis/ValueState.cpp b/clang/Analysis/ValueState.cpp index 3cbcd88d25b..75f719ae6a1 100644 --- a/clang/Analysis/ValueState.cpp +++ b/clang/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); |

