diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 15:41:46 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 15:41:46 +0000 |
commit | 574705ed7f80c59da543ad26d4a5fcd962b5c27d (patch) | |
tree | a2037e4203693828cbfd1f19000dc4199ff6204d /clang/lib/CodeGen/CGCXX.cpp | |
parent | 48803e5ca9c07109c5de8b379c24f15d21b8c244 (diff) | |
download | bcm5719-llvm-574705ed7f80c59da543ad26d4a5fcd962b5c27d.tar.gz bcm5719-llvm-574705ed7f80c59da543ad26d4a5fcd962b5c27d.zip |
[C++11] Replacing CXXRecordDecl iterators bases_begin() and bases_end() with iterator_range bases(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203803
Diffstat (limited to 'clang/lib/CodeGen/CGCXX.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCXX.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp index 29222089a20..ef29af7e070 100644 --- a/clang/lib/CodeGen/CGCXX.cpp +++ b/clang/lib/CodeGen/CGCXX.cpp @@ -62,15 +62,14 @@ bool CodeGenModule::TryEmitBaseDestructorAsAlias(const CXXDestructorDecl *D) { // Try to find a unique base class with a non-trivial destructor. const CXXRecordDecl *UniqueBase = 0; - for (CXXRecordDecl::base_class_const_iterator I = Class->bases_begin(), - E = Class->bases_end(); I != E; ++I) { + for (const auto &I : Class->bases()) { // We're in the base destructor, so skip virtual bases. - if (I->isVirtual()) continue; + if (I.isVirtual()) continue; // Skip base classes with trivial destructors. const CXXRecordDecl *Base - = cast<CXXRecordDecl>(I->getType()->getAs<RecordType>()->getDecl()); + = cast<CXXRecordDecl>(I.getType()->getAs<RecordType>()->getDecl()); if (Base->hasTrivialDestructor()) continue; // If we've already found a base class with a non-trivial |