summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTDumper.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-14 18:34:04 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-14 18:34:04 +0000
commit9371dd2287d35b63193f1f01329e6f7af368d966 (patch)
treea5774aa255e93ba82568bb564b389ef8fc0cd4f8 /clang/lib/AST/ASTDumper.cpp
parent84e0723af89eeea211cfd9fce7edf0cbb70ca483 (diff)
downloadbcm5719-llvm-9371dd2287d35b63193f1f01329e6f7af368d966.tar.gz
bcm5719-llvm-9371dd2287d35b63193f1f01329e6f7af368d966.zip
[C++11] Replacing BlockDecl 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: 203958
Diffstat (limited to 'clang/lib/AST/ASTDumper.cpp')
-rw-r--r--clang/lib/AST/ASTDumper.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp
index 455972d9237..cefb21fb5fc 100644
--- a/clang/lib/AST/ASTDumper.cpp
+++ b/clang/lib/AST/ASTDumper.cpp
@@ -1449,20 +1449,19 @@ void ASTDumper::VisitBlockDecl(const BlockDecl *D) {
IndentScope Indent(*this);
OS << "capture this";
}
- for (BlockDecl::capture_iterator I = D->capture_begin(), E = D->capture_end();
- I != E; ++I) {
+ for (const auto &I : D->captures()) {
IndentScope Indent(*this);
OS << "capture";
- if (I->isByRef())
+ if (I.isByRef())
OS << " byref";
- if (I->isNested())
+ if (I.isNested())
OS << " nested";
- if (I->getVariable()) {
+ if (I.getVariable()) {
OS << ' ';
- dumpBareDeclRef(I->getVariable());
+ dumpBareDeclRef(I.getVariable());
}
- if (I->hasCopyExpr())
- dumpStmt(I->getCopyExpr());
+ if (I.hasCopyExpr())
+ dumpStmt(I.getCopyExpr());
}
lastChild();
dumpStmt(D->getBody());
OpenPOWER on IntegriCloud