diff options
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Analysis/CFG.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Analysis/CFG.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp b/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp index 19b3f5a..54d15bd 100644 --- a/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp +++ b/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp @@ -270,9 +270,8 @@ reverse_children::reverse_children(Stmt *S) { } // Default case for all other statements. - for (Stmt::child_range I = S->children(); I; ++I) { - childrenBuf.push_back(*I); - } + for (Stmt *SubStmt : S->children()) + childrenBuf.push_back(SubStmt); // This needs to be done *after* childrenBuf has been populated. children = childrenBuf; @@ -3641,11 +3640,11 @@ CFGBlock *CFGBuilder::VisitChildrenForTemporaryDtors(Stmt *E, // bottom-up, this means we visit them in their natural order, which // reverses them in the CFG. CFGBlock *B = Block; - for (Stmt::child_range I = E->children(); I; ++I) { - if (Stmt *Child = *I) + for (Stmt *Child : E->children()) + if (Child) if (CFGBlock *R = VisitForTemporaryDtors(Child, false, Context)) B = R; - } + return B; } |