diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-07-02 21:03:14 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-07-02 21:03:14 +0000 |
commit | 642f173ae90097f0da877423172fe45a320e1e5f (patch) | |
tree | 284e9818d8cc8d4cf9782398cd4b3573104ff746 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 9c218592c8400f1ad2345b39e64904fda067553d (diff) | |
download | bcm5719-llvm-642f173ae90097f0da877423172fe45a320e1e5f.tar.gz bcm5719-llvm-642f173ae90097f0da877423172fe45a320e1e5f.zip |
Switch users of the 'for (StmtRange range = stmt->children(); range; ++range)‘ pattern to range for loops.
The pattern was born out of the lack of range-based for loops in C++98
and is somewhat obscure. No functionality change intended.
llvm-svn: 241300
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index bece41e9ecb..f1fc8c45f1e 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -970,8 +970,8 @@ bool CodeGenFunction::ContainsLabel(const Stmt *S, bool IgnoreCaseStmts) { IgnoreCaseStmts = true; // Scan subexpressions for verboten labels. - for (Stmt::const_child_range I = S->children(); I; ++I) - if (ContainsLabel(*I, IgnoreCaseStmts)) + for (const Stmt *SubStmt : S->children()) + if (ContainsLabel(SubStmt, IgnoreCaseStmts)) return true; return false; @@ -994,8 +994,8 @@ bool CodeGenFunction::containsBreak(const Stmt *S) { return true; // Scan subexpressions for verboten breaks. - for (Stmt::const_child_range I = S->children(); I; ++I) - if (containsBreak(*I)) + for (const Stmt *SubStmt : S->children()) + if (containsBreak(SubStmt)) return true; return false; |