From 9371dd2287d35b63193f1f01329e6f7af368d966 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 14 Mar 2014 18:34:04 +0000 Subject: [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 --- clang/lib/AST/ASTDumper.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'clang/lib/AST/ASTDumper.cpp') 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()); -- cgit v1.2.3