From 629afaefe0cd1a583ccee54918b7b13f48bfe273 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 7 Mar 2014 19:56:05 +0000 Subject: [C++11] Replacing DeclBase iterators decls_begin() and decls_end() with iterator_range decls(). The same is true for the noload versions of these APIs. Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203278 --- clang/lib/CodeGen/ModuleBuilder.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'clang/lib/CodeGen/ModuleBuilder.cpp') diff --git a/clang/lib/CodeGen/ModuleBuilder.cpp b/clang/lib/CodeGen/ModuleBuilder.cpp index a51abf0..d54a4a8 100644 --- a/clang/lib/CodeGen/ModuleBuilder.cpp +++ b/clang/lib/CodeGen/ModuleBuilder.cpp @@ -93,10 +93,8 @@ namespace { // In C++, we may have member functions that need to be emitted at this // point. if (Ctx->getLangOpts().CPlusPlus && !D->isDependentContext()) { - for (DeclContext::decl_iterator M = D->decls_begin(), - MEnd = D->decls_end(); - M != MEnd; ++M) - if (CXXMethodDecl *Method = dyn_cast(*M)) + for (auto *M : D->decls()) + if (auto *Method = dyn_cast(M)) if (Method->doesThisDeclarationHaveABody() && (Method->hasAttr() || Method->hasAttr())) -- cgit v1.1