From bbc8662db1548f98b1c475cadf6260f9079c11ea Mon Sep 17 00:00:00 2001 From: Artem Dergachev Date: Thu, 21 Nov 2019 18:12:26 -0800 Subject: [analyzer] NFC: Don't clean up range constraints twice. Slightly improves static analysis speed. Differential Revision: https://reviews.llvm.org/D70150 --- clang/lib/StaticAnalyzer/Core/ProgramState.cpp | 10 ++++------ 1 file changed, 4 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 f50d82de3b2..14006f79fd0 100644 --- a/clang/lib/StaticAnalyzer/Core/ProgramState.cpp +++ b/clang/lib/StaticAnalyzer/Core/ProgramState.cpp @@ -91,10 +91,9 @@ ProgramStateManager::~ProgramStateManager() { I->second.second(I->second.first); } -ProgramStateRef -ProgramStateManager::removeDeadBindings(ProgramStateRef state, - const StackFrameContext *LCtx, - SymbolReaper& SymReaper) { +ProgramStateRef ProgramStateManager::removeDeadBindingsFromEnvironmentAndStore( + ProgramStateRef state, const StackFrameContext *LCtx, + SymbolReaper &SymReaper) { // This code essentially performs a "mark-and-sweep" of the VariableBindings. // The roots are any Block-level exprs and Decls that our liveness algorithm @@ -112,8 +111,7 @@ ProgramStateManager::removeDeadBindings(ProgramStateRef state, NewState.setStore(newStore); SymReaper.setReapedStore(newStore); - ProgramStateRef Result = getPersistentState(NewState); - return ConstraintMgr->removeDeadBindings(Result, SymReaper); + return getPersistentState(NewState); } ProgramStateRef ProgramState::bindLoc(Loc LV, -- cgit v1.2.3