diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-07 18:11:58 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-07 18:11:58 +0000 |
| commit | 1391608234b607157da1d4f742a60ba94b9b8985 (patch) | |
| tree | 04f857b2beb7b5b53202750f408d0a84b93602af /clang/lib/CodeGen/CGClass.cpp | |
| parent | c7cb940440e117f64fdbf07c173db37a70d87723 (diff) | |
| download | bcm5719-llvm-1391608234b607157da1d4f742a60ba94b9b8985.tar.gz bcm5719-llvm-1391608234b607157da1d4f742a60ba94b9b8985.zip | |
[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.
llvm-svn: 203261
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGClass.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index 4cab3719c4d..83c1ece12f5 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/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); |

