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/Analysis/CallGraph.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/lib/Analysis/CallGraph.cpp') diff --git a/clang/lib/Analysis/CallGraph.cpp b/clang/lib/Analysis/CallGraph.cpp index 24705e534b5..649ba57bf58 100644 --- a/clang/lib/Analysis/CallGraph.cpp +++ b/clang/lib/Analysis/CallGraph.cpp @@ -95,9 +95,8 @@ void CallGraph::addNodesForBlocks(DeclContext *D) { if (BlockDecl *BD = dyn_cast(D)) addNodeForDecl(BD, true); - for (DeclContext::decl_iterator I = D->decls_begin(), E = D->decls_end(); - I!=E; ++I) - if (DeclContext *DC = dyn_cast(*I)) + for (auto *I : D->decls()) + if (auto *DC = dyn_cast(I)) addNodesForBlocks(DC); } -- cgit v1.2.3