[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
This commit is contained in:
@@ -2832,13 +2832,12 @@ void CodeGenModule::EmitObjCIvarInitializations(ObjCImplementationDecl *D) {
|
||||
|
||||
/// EmitNamespace - Emit all declarations in a namespace.
|
||||
void CodeGenModule::EmitNamespace(const NamespaceDecl *ND) {
|
||||
for (RecordDecl::decl_iterator I = ND->decls_begin(), E = ND->decls_end();
|
||||
I != E; ++I) {
|
||||
if (const VarDecl *VD = dyn_cast<VarDecl>(*I))
|
||||
for (auto *I : ND->decls()) {
|
||||
if (const auto *VD = dyn_cast<VarDecl>(I))
|
||||
if (VD->getTemplateSpecializationKind() != TSK_ExplicitSpecialization &&
|
||||
VD->getTemplateSpecializationKind() != TSK_Undeclared)
|
||||
continue;
|
||||
EmitTopLevelDecl(*I);
|
||||
EmitTopLevelDecl(I);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2850,17 +2849,16 @@ void CodeGenModule::EmitLinkageSpec(const LinkageSpecDecl *LSD) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (RecordDecl::decl_iterator I = LSD->decls_begin(), E = LSD->decls_end();
|
||||
I != E; ++I) {
|
||||
for (auto *I : LSD->decls()) {
|
||||
// Meta-data for ObjC class includes references to implemented methods.
|
||||
// Generate class's method definitions first.
|
||||
if (ObjCImplDecl *OID = dyn_cast<ObjCImplDecl>(*I)) {
|
||||
if (auto *OID = dyn_cast<ObjCImplDecl>(I)) {
|
||||
for (ObjCContainerDecl::method_iterator M = OID->meth_begin(),
|
||||
MEnd = OID->meth_end();
|
||||
M != MEnd; ++M)
|
||||
EmitTopLevelDecl(*M);
|
||||
}
|
||||
EmitTopLevelDecl(*I);
|
||||
EmitTopLevelDecl(I);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user