r190650 - [analyzer] Run post-stmt checks for DeclStmt.
Jordan Rose
jordan_rose at apple.com
Thu Sep 12 17:44:48 PDT 2013
Author: jrose
Date: Thu Sep 12 19:44:47 2013
New Revision: 190650
URL: http://llvm.org/viewvc/llvm-project?rev=190650&view=rev
Log:
[analyzer] Run post-stmt checks for DeclStmt.
No tests because no in-tree checkers use this, but that shouldn't stop
out-of-tree checkers.
Found by Aemon Cannon!
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp?rev=190650&r1=190649&r2=190650&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp Thu Sep 12 19:44:47 2013
@@ -446,7 +446,8 @@ void ExprEngine::VisitDeclStmt(const Dec
ExplodedNodeSet dstPreVisit;
getCheckerManager().runCheckersForPreStmt(dstPreVisit, Pred, DS, *this);
- StmtNodeBuilder B(dstPreVisit, Dst, *currBldrCtx);
+ ExplodedNodeSet dstEvaluated;
+ StmtNodeBuilder B(dstPreVisit, dstEvaluated, *currBldrCtx);
for (ExplodedNodeSet::iterator I = dstPreVisit.begin(), E = dstPreVisit.end();
I!=E; ++I) {
ExplodedNode *N = *I;
@@ -499,6 +500,8 @@ void ExprEngine::VisitDeclStmt(const Dec
B.generateNode(DS, N, state);
}
}
+
+ getCheckerManager().runCheckersForPostStmt(Dst, B.getResults(), DS, *this);
}
static ProgramStateRef evaluateLogicalExpression(const Expr *E,
More information about the cfe-commits
mailing list