diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-07 19:56:05 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-07 19:56:05 +0000 |
commit | 629afaefe0cd1a583ccee54918b7b13f48bfe273 (patch) | |
tree | 9a236cdf36b4b96c8aad05ccdb63d8f40f9acd9c /clang/lib/CodeGen/ModuleBuilder.cpp | |
parent | d72a5f103da45e5abe10497308fce5aeb992cdc2 (diff) | |
download | llvm-629afaefe0cd1a583ccee54918b7b13f48bfe273.zip llvm-629afaefe0cd1a583ccee54918b7b13f48bfe273.tar.gz llvm-629afaefe0cd1a583ccee54918b7b13f48bfe273.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/CodeGen/ModuleBuilder.cpp')
-rw-r--r-- | clang/lib/CodeGen/ModuleBuilder.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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<CXXMethodDecl>(*M)) + for (auto *M : D->decls()) + if (auto *Method = dyn_cast<CXXMethodDecl>(M)) if (Method->doesThisDeclarationHaveABody() && (Method->hasAttr<UsedAttr>() || Method->hasAttr<ConstructorAttr>())) |