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 | caabaa8e4b0d6d4534152852a3dfc69cfd386050 (patch) | |
| tree | 8d66826ff8200fa980f9e1af2a894513470cac91 /lib/CodeGen/ModuleBuilder.cpp | |
| parent | 445fc769a36f34b7b173566fb5016506199f843d (diff) | |
| download | clang-caabaa8e4b0d6d4534152852a3dfc69cfd386050.tar.gz clang-caabaa8e4b0d6d4534152852a3dfc69cfd386050.tar.bz2 clang-caabaa8e4b0d6d4534152852a3dfc69cfd386050.tar.xz | |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203278 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ModuleBuilder.cpp')
| -rw-r--r-- | lib/CodeGen/ModuleBuilder.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/CodeGen/ModuleBuilder.cpp b/lib/CodeGen/ModuleBuilder.cpp index a51abf03d5..d54a4a8186 100644 --- a/lib/CodeGen/ModuleBuilder.cpp +++ b/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>())) |
