DeclContext iterators using_directives_begin() and
using_directives_end() were replaced with iterator_range
using_directives().
C++11 is now required, so I hope the range-based for-loops are
acceptable.
diff --git a/clang_delta/RemoveUnusedFunction.cpp b/clang_delta/RemoveUnusedFunction.cpp
index f69c261435be..405cc5030385 100644
--- a/clang_delta/RemoveUnusedFunction.cpp
+++ b/clang_delta/RemoveUnusedFunction.cpp
@@ -654,9 +654,8 @@ RemoveUnusedFunction::lookupFunctionDeclShallow(const DeclarationName&DName,
}
}
- for (DeclContext::udir_iterator I = Ctx->using_directives_begin(),
- E = Ctx->using_directives_end(); I != E; ++I) {
- const NamespaceDecl *ND = (*I)->getNominatedNamespace();
+ for (auto *I : Ctx->using_directives()) {
+ const NamespaceDecl *ND = I->getNominatedNamespace();
// avoid infinite recursion
if (ND->getLookupParent() == Ctx)
return NULL;
diff --git a/clang_delta/Transformation.cpp b/clang_delta/Transformation.cpp
index 3068b14ce3d8..b440f9bfa33a 100644
--- a/clang_delta/Transformation.cpp
+++ b/clang_delta/Transformation.cpp
@@ -579,9 +579,8 @@ const FunctionDecl *Transformation::lookupFunctionDecl(
}
}
- for (DeclContext::udir_iterator I = Ctx->using_directives_begin(),
- E = Ctx->using_directives_end(); I != E; ++I) {
- const NamespaceDecl *ND = (*I)->getNominatedNamespace();
+ for (auto *I : Ctx->using_directives()) {
+ const NamespaceDecl *ND = I->getNominatedNamespace();
// avoid infinite recursion
if (ND->getLookupParent() == Ctx)
return NULL;