From 445a939db82713007c9b532144a405f05a587c52 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 13 Mar 2014 16:15:17 +0000 Subject: [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. llvm-svn: 203808 --- clang/lib/CodeGen/CGExprConstant.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CGExprConstant.cpp') diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 34aa3018fca..82382ddf688 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/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(I->getType()->castAs()->getDecl()); + cast(I.getType()->castAs()->getDecl()); // Ignore empty bases. if (base->isEmpty()) -- cgit v1.2.3