diff options
author | Anna Zaks <ganna@apple.com> | 2011-10-27 00:59:28 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-10-27 00:59:28 +0000 |
commit | 4d2ae4a70336dc2aa11389b34946be152bb454c9 (patch) | |
tree | 91c63458cea275276ec29b9e425f9c88fb6aa774 /lib/StaticAnalyzer/Core/ExprEngine.cpp | |
parent | dd7ddf2b2296f95e7591ca3f9791f0eb9a15ee42 (diff) |
[analyzer] Move enqueueEndOfFunction into CoreEngine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143090 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngine.cpp | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp index 2c5379f66a..3924154f6f 100644 --- a/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -1100,42 +1100,13 @@ void ExprEngine::processIndirectGoto(IndirectGotoNodeBuilder &builder) { builder.generateNode(I, state); } -// TODO: The next two functions should be moved into CoreEngine. -void ExprEngine::GenerateCallExitNode(ExplodedNode *N) { - // Create a CallExit node and enqueue it. - const StackFrameContext *LocCtx - = cast<StackFrameContext>(N->getLocationContext()); - const Stmt *CE = LocCtx->getCallSite(); - - // Use the the callee location context. - CallExit Loc(CE, LocCtx); - - bool isNew; - ExplodedNode *Node = Engine.G->getNode(Loc, N->getState(), &isNew); - Node->addPredecessor(N, *Engine.G); - - if (isNew) - Engine.WList->enqueue(Node); -} - -void ExprEngine::enqueueEndOfPath(ExplodedNodeSet &S) { - for (ExplodedNodeSet::iterator I = S.begin(), E = S.end(); I != E; ++I) { - ExplodedNode *N = *I; - // If we are in an inlined call, generate CallExit node. - if (N->getLocationContext()->getParent()) - GenerateCallExitNode(N); - else - Engine.G->addEndOfPath(N); - } -} - /// 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()); ExplodedNodeSet Dst; getCheckerManager().runCheckersForEndPath(BC, Dst, *this); - enqueueEndOfPath(Dst); + Engine.enqueueEndOfFunction(Dst); } /// ProcessSwitch - Called by CoreEngine. Used to generate successor |