diff options
author | Anna Zaks <ganna@apple.com> | 2011-10-24 18:26:08 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-10-24 18:26:08 +0000 |
commit | 6b6152ba96c164a292cc0b8d8b1d4cecbec27a60 (patch) | |
tree | dbba652d69bfcb5416fed57f8330215f7ec783bd /lib/StaticAnalyzer/Core/ExprEngine.cpp | |
parent | 8ad8c546372fe602708cb7ceeaf0ebbb866735c6 (diff) |
[analyzer] Convert more functions (ex:evalBind()) to iterative builders
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142829 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngine.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp index f141392cbd..781106c30b 100644 --- a/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -1297,9 +1297,13 @@ void ExprEngine::evalBind(ExplodedNodeSet &Dst, const Stmt *StoreE, getCheckerManager().runCheckersForBind(CheckedSet, Pred, location, Val, StoreE, *this); + // TODO: Remove TmpDst after NB refactoring is done. + ExplodedNodeSet TmpDst; + Builder->takeNodes(CheckedSet); + PureStmtNodeBuilder Bldr(CheckedSet, TmpDst, *currentBuilderContext); + for (ExplodedNodeSet::iterator I = CheckedSet.begin(), E = CheckedSet.end(); I!=E; ++I) { - const ProgramState *state = (*I)->getState(); if (atDeclInit) { @@ -1311,8 +1315,10 @@ void ExprEngine::evalBind(ExplodedNodeSet &Dst, const Stmt *StoreE, state = state->bindLoc(location, Val); } - MakeNode(Dst, StoreE, *I, state); + Bldr.generateNode(StoreE, *I, state); } + Builder->addNodes(TmpDst); + Dst.insert(TmpDst); } /// evalStore - Handle the semantics of a store via an assignment. |