summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-08 20:12:42 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-08 20:12:42 +0000
commite8a8baef44c4df704170c74f6117b8541b1ec752 (patch)
tree4267c871876046245818e1d246fa452cea91004a /clang/lib/Sema/SemaCodeComplete.cpp
parent1b91204e3dafe5eb8eafa50ad1d51494ee0ef854 (diff)
downloadbcm5719-llvm-e8a8baef44c4df704170c74f6117b8541b1ec752.tar.gz
bcm5719-llvm-e8a8baef44c4df704170c74f6117b8541b1ec752.zip
[C++11] Replacing RecordDecl iterators field_begin() and field_end() with iterator_range fields(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203355
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--clang/lib/Sema/SemaCodeComplete.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index 4d237ee0e8d..9c03f39e68d 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -4296,14 +4296,12 @@ void Sema::CodeCompleteConstructorInitializer(
}
// Add completions for members.
- for (CXXRecordDecl::field_iterator Field = ClassDecl->field_begin(),
- FieldEnd = ClassDecl->field_end();
- Field != FieldEnd; ++Field) {
+ for (auto *Field : ClassDecl->fields()) {
if (!InitializedFields.insert(cast<FieldDecl>(Field->getCanonicalDecl()))) {
SawLastInitializer
= !Initializers.empty() &&
Initializers.back()->isAnyMemberInitializer() &&
- Initializers.back()->getAnyMember() == *Field;
+ Initializers.back()->getAnyMember() == Field;
continue;
}
@@ -4320,7 +4318,7 @@ void Sema::CodeCompleteConstructorInitializer(
: CCP_MemberDeclaration,
CXCursor_MemberRef,
CXAvailability_Available,
- *Field));
+ Field));
SawLastInitializer = false;
}
Results.ExitScope();
OpenPOWER on IntegriCloud