[cfe-commits] r80980 - /cfe/trunk/lib/Analysis/GRExprEngine.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Thu Sep 3 19:17:36 PDT 2009
Author: zhongxingxu
Date: Thu Sep 3 21:17:35 2009
New Revision: 80980
URL: http://llvm.org/viewvc/llvm-project?rev=80980&view=rev
Log:
move the check into MarkNoReturnFunction.
Modified:
cfe/trunk/lib/Analysis/GRExprEngine.cpp
Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=80980&r1=80979&r2=80980&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Thu Sep 3 21:17:35 2009
@@ -1420,6 +1420,9 @@
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 @@
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.
More information about the cfe-commits
mailing list