Added several guards in transfer functions for "InvalidValues".
Fixed bug in RemoveDeadBindings by implementing a simple "mark-and-sweep"
cleaner over the bindings, starting from the Decls and block-level expressions
that are considered "live" by the Liveness analysis.
Fixed bug in isa<> implementation for class LValue.
Added "VisitDeclRefExpr" to GRConstants so that we explicitly bind the current
value of variable to the Block-level Expression (i.e., when the DeclRefExpr is
at the CFGBlock level).
llvm-svn: 46839
diff --git a/clang/Analysis/ValueState.cpp b/clang/Analysis/ValueState.cpp
index 1b08d8e..b5a5985 100644
--- a/clang/Analysis/ValueState.cpp
+++ b/clang/Analysis/ValueState.cpp
@@ -34,6 +34,9 @@
RValue ValueStateManager::GetValue(const StateTy& St, const LValue& LV) {
+ if (isa<InvalidValue>(LV))
+ return InvalidValue();
+
switch (LV.getSubKind()) {
case lval::DeclValKind: {
StateTy::VariableBindingsTy::TreeTy* T =