diff options
-rw-r--r-- | AST/CFG.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/AST/CFG.cpp b/AST/CFG.cpp index 4a54b469cc..f99de1cc79 100644 --- a/AST/CFG.cpp +++ b/AST/CFG.cpp @@ -332,11 +332,12 @@ CFGBlock* CFGBuilder::WalkAST(Stmt* S, bool AlwaysAddStmt = false) { /// we must linearize declarations to handle arbitrary control-flow induced by /// those expressions. CFGBlock* CFGBuilder::WalkAST_VisitDeclSubExprs(StmtIterator& I) { + if (I == StmtIterator()) + return Block; + Stmt* S = *I; ++I; - - if (I != StmtIterator()) - WalkAST_VisitDeclSubExprs(I); + WalkAST_VisitDeclSubExprs(I); Block = addStmt(S); return Block; |