forked from OSchip/llvm-project
Move the GenerateCallExitNode logic completely into GREndPathNodeBuilder.
llvm-svn: 97131
This commit is contained in:
parent
62702da070
commit
ee29cc3b66
|
@ -26,7 +26,6 @@ public:
|
|||
}
|
||||
|
||||
virtual bool EvalCallExpr(CheckerContext &C, const CallExpr *CE);
|
||||
virtual void EvalEndPath(GREndPathNodeBuilder &B,void *tag,GRExprEngine &Eng);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -53,17 +52,3 @@ bool CallInliner::EvalCallExpr(CheckerContext &C, const CallExpr *CE) {
|
|||
return true;
|
||||
}
|
||||
|
||||
void CallInliner::EvalEndPath(GREndPathNodeBuilder &B, void *tag,
|
||||
GRExprEngine &Eng) {
|
||||
const GRState *state = B.getState();
|
||||
|
||||
ExplodedNode *Pred = B.getPredecessor();
|
||||
|
||||
const StackFrameContext *LocCtx =
|
||||
cast<StackFrameContext>(Pred->getLocationContext());
|
||||
// Check if this is the top level stack frame.
|
||||
if (!LocCtx->getParent())
|
||||
return;
|
||||
|
||||
B.GenerateCallExitNode(state);
|
||||
}
|
||||
|
|
|
@ -612,7 +612,13 @@ GRSwitchNodeBuilder::generateDefaultCaseNode(const GRState* St, bool isSink) {
|
|||
|
||||
GREndPathNodeBuilder::~GREndPathNodeBuilder() {
|
||||
// Auto-generate an EOP node if one has not been generated.
|
||||
if (!HasGeneratedNode) generateNode(Pred->State);
|
||||
if (!HasGeneratedNode) {
|
||||
// If we are in an inlined call, generate CallExit node.
|
||||
if (Pred->getLocationContext()->getParent())
|
||||
GenerateCallExitNode(Pred->State);
|
||||
else
|
||||
generateNode(Pred->State);
|
||||
}
|
||||
}
|
||||
|
||||
ExplodedNode*
|
||||
|
|
Loading…
Reference in New Issue