From 85d28b4e5de6119712110705090da804f02cbd56 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 12 Sep 2007 20:08:31 +0000 Subject: [PATCH] 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 --- include/clang/Analysis/DataflowStmtVisitor.h | 8 ++++---- 1 file 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(this)->VisitChildren(S); static_cast(this)->ObserveBlockStmt(S); @@ -69,8 +69,8 @@ public: static_cast(this)->ObserveBlockStmt(S); static_cast*>(this)->BlockStmt_Visit(S); - if (!CFG::hasImplicitControlFlow(S) && - S->getStmtClass() != Stmt::CallExprClass) + if (!CFG::hasImplicitControlFlow(S) || + S->getStmtClass() == Stmt::CallExprClass) static_cast(this)->VisitChildren(S); } -- 2.40.0