diff options
author | Anna Zaks <ganna@apple.com> | 2012-11-03 02:54:11 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-11-03 02:54:11 +0000 |
commit | 2510608e81f3a316e49c80b89b53e66d455d7d43 (patch) | |
tree | 1653928bf7d30a08d96f3894235f23c6fad69257 /clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | |
parent | a537f6ce3723eaed680d70fde02a93bebbd1d102 (diff) | |
download | bcm5719-llvm-2510608e81f3a316e49c80b89b53e66d455d7d43.tar.gz bcm5719-llvm-2510608e81f3a316e49c80b89b53e66d455d7d43.zip |
[analyzer] Refactor: Remove Pred from NodeBuilderContext.
Node builders should manage the nodes, not the context.
llvm-svn: 167350
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index e3425139e80..664d4d2eb56 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -1055,19 +1055,18 @@ bool ExprEngine::replayWithoutInlining(ExplodedNode *N, /// Block entrance. (Update counters). void ExprEngine::processCFGBlockEntrance(const BlockEdge &L, - NodeBuilderWithSinks &nodeBuilder) { + NodeBuilderWithSinks &nodeBuilder, + ExplodedNode *Pred) { // FIXME: Refactor this into a checker. - ExplodedNode *pred = nodeBuilder.getContext().getPred(); - if (nodeBuilder.getContext().blockCount() >= AMgr.options.maxBlockVisitOnPath) { static SimpleProgramPointTag tag("ExprEngine : Block count exceeded"); const ExplodedNode *Sink = - nodeBuilder.generateSink(pred->getState(), pred, &tag); + nodeBuilder.generateSink(Pred->getState(), Pred, &tag); // Check if we stopped at the top level function or not. // Root node should have the location context of the top most function. - const LocationContext *CalleeLC = pred->getLocation().getLocationContext(); + const LocationContext *CalleeLC = Pred->getLocation().getLocationContext(); const LocationContext *CalleeSF = CalleeLC->getCurrentStackFrame(); const LocationContext *RootLC = (*G.roots_begin())->getLocation().getLocationContext(); @@ -1079,7 +1078,7 @@ void ExprEngine::processCFGBlockEntrance(const BlockEdge &L, // the list. Replay should almost never fail. Use the stats to catch it // if it does. if ((!AMgr.options.NoRetryExhausted && - replayWithoutInlining(pred, CalleeLC))) + replayWithoutInlining(Pred, CalleeLC))) return; NumMaxBlockCountReachedInInlined++; } else @@ -1313,10 +1312,11 @@ void ExprEngine::processIndirectGoto(IndirectGotoNodeBuilder &builder) { /// ProcessEndPath - Called by CoreEngine. Used to generate end-of-path /// nodes when the control reaches the end of a function. -void ExprEngine::processEndOfFunction(NodeBuilderContext& BC) { - StateMgr.EndPath(BC.Pred->getState()); +void ExprEngine::processEndOfFunction(NodeBuilderContext& BC, + ExplodedNode *Pred) { + StateMgr.EndPath(Pred->getState()); ExplodedNodeSet Dst; - getCheckerManager().runCheckersForEndPath(BC, Dst, *this); + getCheckerManager().runCheckersForEndPath(BC, Dst, Pred, *this); Engine.enqueueEndOfFunction(Dst); } |