Fixed logic bug in recursion to visiting child statements.

llvm-svn: 41887
This commit is contained in:
Ted Kremenek 2007-09-12 20:08:31 +00:00
parent 439b19928f
commit b10f1d881e
1 changed files with 4 additions and 4 deletions

View File

@ -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);
}