move the check into MarkNoReturnFunction.

llvm-svn: 80980
This commit is contained in:
Zhongxing Xu 2009-09-04 02:17:35 +00:00
parent 1748d8a43d
commit bfb000f337
1 changed files with 5 additions and 2 deletions

View File

@ -1420,6 +1420,9 @@ static bool EvalOSAtomic(ExplodedNodeSet& Dst,
static void MarkNoReturnFunction(const FunctionDecl *FD, CallExpr *CE,
const GRState *state,
GRStmtNodeBuilder *Builder) {
if (!FD)
return;
if (FD->getAttr<NoReturnAttr>() ||
FD->getAttr<AnalyzerNoReturnAttr>())
Builder->BuildSinks = true;
@ -1580,8 +1583,8 @@ void GRExprEngine::VisitCallRec(CallExpr* CE, ExplodedNode* Pred,
SaveAndRestore<bool> OldSink(Builder->BuildSinks);
const FunctionDecl* FD = L.getAsFunctionDecl();
if (FD)
MarkNoReturnFunction(FD, CE, state, Builder);
MarkNoReturnFunction(FD, CE, state, Builder);
// Evaluate the call.