[cfe-commits] r153900 - /cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
Ted Kremenek
kremenek at apple.com
Mon Apr 2 14:55:06 PDT 2012
Author: kremenek
Date: Mon Apr 2 16:55:06 2012
New Revision: 153900
URL: http://llvm.org/viewvc/llvm-project?rev=153900&view=rev
Log:
Fix potential null dereference in the static analyzer when inlining a call that has already been inlined. Unfortunately I have no test case.
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp?rev=153900&r1=153899&r2=153900&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp Mon Apr 2 16:55:06 2012
@@ -202,10 +202,11 @@
CallEnter Loc(CE, CalleeSFC, Pred->getLocationContext());
bool isNew;
- ExplodedNode *N = G.getNode(Loc, state, false, &isNew);
- N->addPredecessor(Pred, G);
- if (isNew)
- Engine.getWorkList()->enqueue(N);
+ if (ExplodedNode *N = G.getNode(Loc, state, false, &isNew)) {
+ N->addPredecessor(Pred, G);
+ if (isNew)
+ Engine.getWorkList()->enqueue(N);
+ }
return true;
}
}
More information about the cfe-commits
mailing list