diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2016-02-05 19:03:47 +0000 |
---|---|---|
committer | Sérgio Martins <iamsergio@gmail.com> | 2016-02-08 17:58:57 +0000 |
commit | 397d16fee1f023d3ae741a513334009823f1163c (patch) | |
tree | 9dc728324c99390b9a3dd506b95b0e6abdb9f661 /src/qml/compiler/qv4ssa.cpp | |
parent | 3024534574967ace249cf14f08d161ce4e728ba3 (diff) |
Don't deep copy std::vector [-Wclazy-foreach]
Change-Id: Ic326786a64c9b6dcd8cee1b45dec45de9cd90414
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/compiler/qv4ssa.cpp')
-rw-r--r-- | src/qml/compiler/qv4ssa.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp index 0ff3b52870..62ec204aff 100644 --- a/src/qml/compiler/qv4ssa.cpp +++ b/src/qml/compiler/qv4ssa.cpp @@ -570,7 +570,7 @@ class DominatorTree bucket[s].push_back(n); link(p, n); if (bucket.contains(p)) { - foreach (BasicBlockIndex v, bucket[p]) { + for (BasicBlockIndex v : bucket[p]) { BasicBlockIndex y = ancestorWithLowestSemi(v, worklist); BasicBlockIndex semi_v = d->semi[v]; if (d->semi[y] == semi_v) @@ -670,7 +670,7 @@ public: foreach (BasicBlock *y, function->basicBlock(node)->out) if (idom[y->index()] != node) S.insert(y); - foreach (BasicBlockIndex child, np.children) { + for (BasicBlockIndex child : np.children) { const BasicBlockSet &ws = DF[child]; for (BasicBlockSet::const_iterator it = ws.begin(), eit = ws.end(); it != eit; ++it) { BasicBlock *w = *it; @@ -1733,7 +1733,7 @@ void convertToSSA(IR::Function *function, const DominatorTree &df, DefUses &defU W.reserve(8); // Place phi functions: - foreach (const Temp &a, variables.allTemps()) { + for (const Temp &a : variables.allTemps()) { if (a.isInvalid()) continue; if (!variables.isNonLocal(a)) @@ -1791,7 +1791,7 @@ void cleanupPhis(DefUses &defUses) std::vector<Phi *> allPhis; allPhis.reserve(32); - foreach (const Temp *def, defUses.defs()) { + for (const Temp *def : defUses.defs()) { Stmt *defStmt = defUses.defStmt(*def); if (!defStmt) continue; @@ -1808,7 +1808,7 @@ void cleanupPhis(DefUses &defUses) toRemove |= collectedPhis; } - foreach (Phi *phi, allPhis) { + for (Phi *phi : allPhis) { if (!toRemove.at(phi->id())) continue; |