summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-07-02 21:03:14 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-07-02 21:03:14 +0000
commit642f173ae90097f0da877423172fe45a320e1e5f (patch)
tree284e9818d8cc8d4cf9782398cd4b3573104ff746 /clang/lib/CodeGen/CodeGenFunction.cpp
parent9c218592c8400f1ad2345b39e64904fda067553d (diff)
downloadbcm5719-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.cpp8
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;
OpenPOWER on IntegriCloud