From cb7b7eaff0627e088b362ecf71f3740c9f6541f9 Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Fri, 13 Sep 2013 00:44:47 +0000 Subject: [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! llvm-svn: 190650 --- clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'clang') diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp index e28cc86..b2d62ac 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp @@ -446,7 +446,8 @@ void ExprEngine::VisitDeclStmt(const DeclStmt *DS, ExplodedNode *Pred, 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 DeclStmt *DS, ExplodedNode *Pred, B.generateNode(DS, N, state); } } + + getCheckerManager().runCheckersForPostStmt(Dst, B.getResults(), DS, *this); } static ProgramStateRef evaluateLogicalExpression(const Expr *E, -- cgit v1.1