From 0ad78303decbdce1c35a7082de91ec6263f970be Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 13 Mar 2014 17:34:31 +0000 Subject: [C++11] Replacing CXXRecordDecl iterators init_begin() and init_end() with iterator_range inits(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203819 --- clang/tools/libclang/CIndex.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'clang/tools/libclang/CIndex.cpp') diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 456bdcc5536..67bcff963ff 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -812,13 +812,11 @@ bool CursorVisitor::VisitFunctionDecl(FunctionDecl *ND) { if (CXXConstructorDecl *Constructor = dyn_cast(ND)) { // Find the initializers that were written in the source. SmallVector WrittenInits; - for (CXXConstructorDecl::init_iterator I = Constructor->init_begin(), - IEnd = Constructor->init_end(); - I != IEnd; ++I) { - if (!(*I)->isWritten()) + for (auto *I : Constructor->inits()) { + if (!I->isWritten()) continue; - WrittenInits.push_back(*I); + WrittenInits.push_back(I); } // Sort the initializers in source order -- cgit v1.2.3