From 4e71ddb873bacaf44407291609fe3a6fd9bf8840 Mon Sep 17 00:00:00 2001 From: Zhongxing Xu Date: Fri, 4 Sep 2009 02:17:35 +0000 Subject: [PATCH] move the check into MarkNoReturnFunction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80980 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/GRExprEngine.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index ba17d21a6c..df31c3f53b 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -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() || FD->getAttr()) Builder->BuildSinks = true; @@ -1580,8 +1583,8 @@ void GRExprEngine::VisitCallRec(CallExpr* CE, ExplodedNode* Pred, SaveAndRestore OldSink(Builder->BuildSinks); const FunctionDecl* FD = L.getAsFunctionDecl(); - if (FD) - MarkNoReturnFunction(FD, CE, state, Builder); + + MarkNoReturnFunction(FD, CE, state, Builder); // Evaluate the call.