From ae134c64494af5bce1414e754fad0d8b5f99ee33 Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Thu, 20 Sep 2012 01:54:56 +0000 Subject: Revert "[analyzer] Remove constraints on dead symbols as part of removeDeadBindings." While we definitely want this optimization in the future, we're not currently handling constraints on symbolic /expressions/ correctly. These should stay live even if the SymExpr itself is no longer referenced because could recreate an identical SymExpr later. Only once the SymExpr can no longer be recreated -- i.e. a component symbol is dead -- can we safely remove the constraints on it. This liveness issue is tracked by . This reverts r163444 / 24c7f98828e039005cff3bd847e7ab404a6a09f8. llvm-svn: 164275 --- clang/lib/StaticAnalyzer/Core/ProgramState.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'clang/lib/StaticAnalyzer/Core/ProgramState.cpp') diff --git a/clang/lib/StaticAnalyzer/Core/ProgramState.cpp b/clang/lib/StaticAnalyzer/Core/ProgramState.cpp index 56c6c04df0c..ed128ef00d8 100644 --- a/clang/lib/StaticAnalyzer/Core/ProgramState.cpp +++ b/clang/lib/StaticAnalyzer/Core/ProgramState.cpp @@ -106,9 +106,8 @@ ProgramStateManager::removeDeadBindings(ProgramStateRef state, SymReaper); NewState.setStore(newStore); SymReaper.setReapedStore(newStore); - - ProgramStateRef Result = getPersistentState(NewState); - return ConstraintMgr->removeDeadBindings(Result, SymReaper); + + return getPersistentState(NewState); } ProgramStateRef ProgramState::bindCompoundLiteral(const CompoundLiteralExpr *CL, @@ -687,9 +686,7 @@ bool ProgramState::isTainted(SymbolRef Sym, TaintTagType Kind) const { bool Tainted = false; for (SymExpr::symbol_iterator SI = Sym->symbol_begin(), SE =Sym->symbol_end(); SI != SE; ++SI) { - if (!isa(*SI)) - continue; - + assert(isa(*SI)); const TaintTagType *Tag = get(*SI); Tainted = (Tag && *Tag == Kind); -- cgit v1.2.3