diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-09-13 00:44:47 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-09-13 00:44:47 +0000 |
commit | cb7b7eaff0627e088b362ecf71f3740c9f6541f9 (patch) | |
tree | 9c158aa12ec560804fa42fef887e0d29db0cd62f /clang | |
parent | dd1a01203df440b4304eab6367e3be49935377ff (diff) | |
download | llvm-cb7b7eaff0627e088b362ecf71f3740c9f6541f9.zip llvm-cb7b7eaff0627e088b362ecf71f3740c9f6541f9.tar.gz llvm-cb7b7eaff0627e088b362ecf71f3740c9f6541f9.tar.bz2 |
[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
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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, |