diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-09-04 02:17:35 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-09-04 02:17:35 +0000 |
commit | 4e71ddb873bacaf44407291609fe3a6fd9bf8840 (patch) | |
tree | d248eeb653d597b899a0412755a90b434d009460 | |
parent | 326d6176ae9c7fc69be31b842476f71ffce0e000 (diff) |
move the check into MarkNoReturnFunction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80980 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Analysis/GRExprEngine.cpp | 7 |
1 files 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<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. |