summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-13 18:47:37 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-13 18:47:37 +0000
commitdc4bea46763b5a8b7656baa24034edc9941a0aed (patch)
treec372e891f9847b780b3c52ae7abdf38611d8ad29 /clang/lib/Sema/SemaCodeComplete.cpp
parent8d62008ecb3edd841341789112a0fcab587beff5 (diff)
downloadbcm5719-llvm-dc4bea46763b5a8b7656baa24034edc9941a0aed.tar.gz
bcm5719-llvm-dc4bea46763b5a8b7656baa24034edc9941a0aed.zip
[C++11] Replacing ObjCContainerDecl iterators prop_begin() and prop_end() with iterator_range props(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203830
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--clang/lib/Sema/SemaCodeComplete.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index 832553aea7c..f1da3b4ad17 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -3458,14 +3458,10 @@ static void AddObjCProperties(ObjCContainerDecl *Container,
Container = getContainerDef(Container);
// Add properties in this container.
- for (ObjCContainerDecl::prop_iterator P = Container->prop_begin(),
- PEnd = Container->prop_end();
- P != PEnd;
- ++P) {
+ for (const auto *P : Container->props())
if (AddedProperties.insert(P->getIdentifier()))
- Results.MaybeAddResult(Result(*P, Results.getBasePriority(*P), 0),
+ Results.MaybeAddResult(Result(P, Results.getBasePriority(P), 0),
CurContext);
- }
// Add nullary methods
if (AllowNullaryMethods) {
@@ -6981,14 +6977,10 @@ void Sema::CodeCompleteObjCMethodDecl(Scope *S,
}
}
- for (unsigned I = 0, N = Containers.size(); I != N; ++I) {
- for (ObjCContainerDecl::prop_iterator P = Containers[I]->prop_begin(),
- PEnd = Containers[I]->prop_end();
- P != PEnd; ++P) {
- AddObjCKeyValueCompletions(*P, IsInstanceMethod, ReturnType, Context,
+ for (unsigned I = 0, N = Containers.size(); I != N; ++I)
+ for (auto *P : Containers[I]->props())
+ AddObjCKeyValueCompletions(P, IsInstanceMethod, ReturnType, Context,
KnownSelectors, Results);
- }
- }
}
Results.ExitScope();
OpenPOWER on IntegriCloud