From 629afaefe0cd1a583ccee54918b7b13f48bfe273 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 7 Mar 2014 19:56:05 +0000 Subject: [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 --- clang/lib/Sema/SemaAccess.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'clang/lib/Sema/SemaAccess.cpp') diff --git a/clang/lib/Sema/SemaAccess.cpp b/clang/lib/Sema/SemaAccess.cpp index 66e6e644655..60c3e726e61 100644 --- a/clang/lib/Sema/SemaAccess.cpp +++ b/clang/lib/Sema/SemaAccess.cpp @@ -1138,11 +1138,9 @@ static void diagnoseBadDirectAccess(Sema &S, // Check whether there's an AccessSpecDecl preceding this in the // chain of the DeclContext. bool isImplicit = true; - for (CXXRecordDecl::decl_iterator - I = DeclaringClass->decls_begin(), E = DeclaringClass->decls_end(); - I != E; ++I) { - if (*I == ImmediateChild) break; - if (isa(*I)) { + for (const auto *I : DeclaringClass->decls()) { + if (I == ImmediateChild) break; + if (isa(I)) { isImplicit = false; break; } -- cgit v1.2.3