summaryrefslogtreecommitdiff
path: root/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
commit8328f6462b3e0b8d77a2da5cfbdf1885950e5fc8 (patch)
tree4f04e9f1980f32d611aa295339a054b06e255cd4 /lib/Sema/SemaCodeComplete.cpp
parent0ce08a07392951d4c05c8d754317cfd3105760d0 (diff)
downloadclang-8328f6462b3e0b8d77a2da5cfbdf1885950e5fc8.tar.gz
clang-8328f6462b3e0b8d77a2da5cfbdf1885950e5fc8.tar.bz2
clang-8328f6462b3e0b8d77a2da5cfbdf1885950e5fc8.tar.xz
[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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203355 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--lib/Sema/SemaCodeComplete.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index 4d237ee0e8..9c03f39e68 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/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();