diff options
author | Artem Dergachev <artem.dergachev@gmail.com> | 2019-11-21 18:12:26 -0800 |
---|---|---|
committer | Artem Dergachev <artem.dergachev@gmail.com> | 2019-11-21 18:59:46 -0800 |
commit | bbc8662db1548f98b1c475cadf6260f9079c11ea (patch) | |
tree | 4b92adbc819e66b25af3c8010bc24ba8cd4a0a8f /clang/lib/StaticAnalyzer/Core/ProgramState.cpp | |
parent | b29e5cdb7c98c93e16955e58efeb922da93f969f (diff) | |
download | bcm5719-llvm-bbc8662db1548f98b1c475cadf6260f9079c11ea.tar.gz bcm5719-llvm-bbc8662db1548f98b1c475cadf6260f9079c11ea.zip |
[analyzer] NFC: Don't clean up range constraints twice.
Slightly improves static analysis speed.
Differential Revision: https://reviews.llvm.org/D70150
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ProgramState.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ProgramState.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
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, |