diff options
author | Ted Kremenek <kremenek@apple.com> | 2007-09-12 20:08:31 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2007-09-12 20:08:31 +0000 |
commit | 85d28b4e5de6119712110705090da804f02cbd56 (patch) | |
tree | 7d0d0d9a207be8a3c04ce56cb30faccf2af26e93 | |
parent | 8b2d2fd023f95f80af06c703afb3351ba0af1d8b (diff) |
Fixed logic bug in recursion to visiting child statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41887 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Analysis/DataflowStmtVisitor.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/clang/Analysis/DataflowStmtVisitor.h b/include/clang/Analysis/DataflowStmtVisitor.h index 67c4a75c73..2f56552090 100644 --- a/include/clang/Analysis/DataflowStmtVisitor.h +++ b/include/clang/Analysis/DataflowStmtVisitor.h @@ -56,8 +56,8 @@ public: void BlockStmt_Visit(Stmt* S, dataflow::forward_analysis_tag) { // Process statements in a postorder traversal of the AST. - if (!CFG::hasImplicitControlFlow(S) && - S->getStmtClass() != Stmt::CallExprClass) + if (!CFG::hasImplicitControlFlow(S) || + S->getStmtClass() == Stmt::CallExprClass) static_cast<ImplClass*>(this)->VisitChildren(S); static_cast<ImplClass*>(this)->ObserveBlockStmt(S); @@ -69,8 +69,8 @@ public: static_cast<ImplClass*>(this)->ObserveBlockStmt(S); static_cast<CFGStmtVisitor<ImplClass,void>*>(this)->BlockStmt_Visit(S); - if (!CFG::hasImplicitControlFlow(S) && - S->getStmtClass() != Stmt::CallExprClass) + if (!CFG::hasImplicitControlFlow(S) || + S->getStmtClass() == Stmt::CallExprClass) static_cast<ImplClass*>(this)->VisitChildren(S); } |