diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 17:34:31 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 17:34:31 +0000 |
commit | 0ad78303decbdce1c35a7082de91ec6263f970be (patch) | |
tree | 9f559a314e9c58e237195753e22759e6389ce786 /clang/tools/libclang/CIndex.cpp | |
parent | 08ef1233c694cefec755f31a67e50b9916290a18 (diff) | |
download | bcm5719-llvm-0ad78303decbdce1c35a7082de91ec6263f970be.tar.gz bcm5719-llvm-0ad78303decbdce1c35a7082de91ec6263f970be.zip |
[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
Diffstat (limited to 'clang/tools/libclang/CIndex.cpp')
-rw-r--r-- | clang/tools/libclang/CIndex.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
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<CXXConstructorDecl>(ND)) { // Find the initializers that were written in the source. SmallVector<CXXCtorInitializer *, 4> 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 |