[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:
@@ -57,16 +57,14 @@ void ASTMergeAction::ExecuteAction() {
|
||||
/*MinimalImport=*/false);
|
||||
|
||||
TranslationUnitDecl *TU = Unit->getASTContext().getTranslationUnitDecl();
|
||||
for (DeclContext::decl_iterator D = TU->decls_begin(),
|
||||
DEnd = TU->decls_end();
|
||||
D != DEnd; ++D) {
|
||||
for (auto *D : TU->decls()) {
|
||||
// Don't re-import __va_list_tag, __builtin_va_list.
|
||||
if (NamedDecl *ND = dyn_cast<NamedDecl>(*D))
|
||||
if (const auto *ND = dyn_cast<NamedDecl>(D))
|
||||
if (IdentifierInfo *II = ND->getIdentifier())
|
||||
if (II->isStr("__va_list_tag") || II->isStr("__builtin_va_list"))
|
||||
continue;
|
||||
|
||||
Importer.Import(*D);
|
||||
Importer.Import(D);
|
||||
}
|
||||
|
||||
delete Unit;
|
||||
|
||||
Reference in New Issue
Block a user