From 0ec04bf73885df3e10bd7fcd5c8ce901cad7d76c Mon Sep 17 00:00:00 2001 From: Anna Zaks Date: Thu, 27 Oct 2011 00:59:28 +0000 Subject: [analyzer] Move enqueueEndOfFunction into CoreEngine. llvm-svn: 143090 --- clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 31 +--------------------------- 1 file changed, 1 insertion(+), 30 deletions(-) (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngine.cpp') diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index 2c5379f66a7..3924154f6f4 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/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(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 -- cgit v1.2.3