diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 16:15:17 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 16:15:17 +0000 |
| commit | c3aad302fe8477e9e4fc5244c3a3c5baadca7857 (patch) | |
| tree | f53fbf7384b70be38a38007215cc9676f8ff3aff /lib/CodeGen/CGExprConstant.cpp | |
| parent | 07ca0a226e9409c39f4d729dd514c2a3ceefa526 (diff) | |
| download | clang-c3aad302fe8477e9e4fc5244c3a3c5baadca7857.tar.gz clang-c3aad302fe8477e9e4fc5244c3a3c5baadca7857.tar.bz2 clang-c3aad302fe8477e9e4fc5244c3a3c5baadca7857.tar.xz | |
[C++11] Replacing CXXRecordDecl iterators vbases_begin() and vbases_end() with iterator_range vbases(). Updating all of the usages of the iterators with range-based for loops.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203808 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
| -rw-r--r-- | lib/CodeGen/CGExprConstant.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index 34aa3018fc..82382ddf68 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/lib/CodeGen/CGExprConstant.cpp @@ -1372,10 +1372,9 @@ static llvm::Constant *EmitNullConstant(CodeGenModule &CGM, // Fill in the virtual bases, if we're working with the complete object. if (asCompleteObject) { - for (CXXRecordDecl::base_class_const_iterator - I = record->vbases_begin(), E = record->vbases_end(); I != E; ++I) { + for (const auto &I : record->vbases()) { const CXXRecordDecl *base = - cast<CXXRecordDecl>(I->getType()->castAs<RecordType>()->getDecl()); + cast<CXXRecordDecl>(I.getType()->castAs<RecordType>()->getDecl()); // Ignore empty bases. if (base->isEmpty()) |
