diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-14 18:08:33 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-14 18:08:33 +0000 |
commit | c656303a2c9f24209bea8176c51cd8fea8153d29 (patch) | |
tree | 20a605b46c20c0c707dacefc310c58222e0501bf /clang/lib/AST/Stmt.cpp | |
parent | 3c9a0d05cd2525df193c03659e547cb81bfef432 (diff) | |
download | bcm5719-llvm-c656303a2c9f24209bea8176c51cd8fea8153d29.tar.gz bcm5719-llvm-c656303a2c9f24209bea8176c51cd8fea8153d29.zip |
[C++11] Replacing CapturedStmt iterators capture_begin() and capture_end() with iterator_range captures(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203953
Diffstat (limited to 'clang/lib/AST/Stmt.cpp')
-rw-r--r-- | clang/lib/AST/Stmt.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp index ec5ee8b0713..4c6318cc6ec 100644 --- a/clang/lib/AST/Stmt.cpp +++ b/clang/lib/AST/Stmt.cpp @@ -1100,15 +1100,14 @@ Stmt::child_range CapturedStmt::children() { } bool CapturedStmt::capturesVariable(const VarDecl *Var) const { - for (const_capture_iterator I = capture_begin(), - E = capture_end(); I != E; ++I) { - if (!I->capturesVariable()) + for (const auto &I : captures()) { + if (!I.capturesVariable()) continue; // This does not handle variable redeclarations. This should be // extended to capture variables with redeclarations, for example // a thread-private variable in OpenMP. - if (I->getCapturedVar() == Var) + if (I.getCapturedVar() == Var) return true; } |