summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-07 18:11:58 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-07 18:11:58 +0000
commit0a8ec268578f1152dbdf81ea4e2ac54e294c2ac5 (patch)
treeb8c9a3825a317044aea197629845e044bc903125 /lib/CodeGen/CGClass.cpp
parent835f12246925f5a5ba1c8bf0bc413ef0401d7cd8 (diff)
downloadclang-0a8ec268578f1152dbdf81ea4e2ac54e294c2ac5.tar.gz
clang-0a8ec268578f1152dbdf81ea4e2ac54e294c2ac5.tar.bz2
clang-0a8ec268578f1152dbdf81ea4e2ac54e294c2ac5.tar.xz
[C++11] Replacing IndirectFieldDecl iterators chain_begin() and chain_end() with iterator_range chains(). Updating all of the usages of the iterators with range-based for loops.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203261 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGClass.cpp')
-rw-r--r--lib/CodeGen/CGClass.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp
index 4cab3719c4..83c1ece12f 100644
--- a/lib/CodeGen/CGClass.cpp
+++ b/lib/CodeGen/CGClass.cpp
@@ -549,10 +549,8 @@ static void EmitMemberInitializer(CodeGenFunction &CGF,
// If we are initializing an anonymous union field, drill down to
// the field.
IndirectFieldDecl *IndirectField = MemberInit->getIndirectMember();
- IndirectFieldDecl::chain_iterator I = IndirectField->chain_begin(),
- IEnd = IndirectField->chain_end();
- for ( ; I != IEnd; ++I)
- LHS = CGF.EmitLValueForFieldInitialization(LHS, cast<FieldDecl>(*I));
+ for (const auto *I : IndirectField->chains())
+ LHS = CGF.EmitLValueForFieldInitialization(LHS, cast<FieldDecl>(I));
FieldType = MemberInit->getIndirectMember()->getAnonField()->getType();
} else {
LHS = CGF.EmitLValueForFieldInitialization(LHS, Field);