summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-13 19:50:17 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-13 19:50:17 +0000
commitf26acce6f74658f8ab7ec3b0325363c228ffc5ae (patch)
tree208231a17e854281d810ed4e53e53da7f98ac57f /clang/lib/Sema/SemaObjCProperty.cpp
parent514fc61c091d985c561d5a60166a96f772461131 (diff)
downloadbcm5719-llvm-f26acce6f74658f8ab7ec3b0325363c228ffc5ae.tar.gz
bcm5719-llvm-f26acce6f74658f8ab7ec3b0325363c228ffc5ae.zip
[C++11] Replacing ObjCContainerDecl iterators instmeth_begin() and instmeth_end() with iterator_range instance_methods(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203839
Diffstat (limited to 'clang/lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--clang/lib/Sema/SemaObjCProperty.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp
index 4013538b2e1..4c203d3ece8 100644
--- a/clang/lib/Sema/SemaObjCProperty.cpp
+++ b/clang/lib/Sema/SemaObjCProperty.cpp
@@ -1742,9 +1742,8 @@ void Sema::DiagnoseUnimplementedProperties(Scope *S, ObjCImplDecl* IMPDecl,
SelectorSet InsMap;
// Collect property accessors implemented in current implementation.
- for (ObjCImplementationDecl::instmeth_iterator
- I = IMPDecl->instmeth_begin(), E = IMPDecl->instmeth_end(); I!=E; ++I)
- InsMap.insert((*I)->getSelector());
+ for (const auto *I : IMPDecl->instance_methods())
+ InsMap.insert(I->getSelector());
ObjCCategoryDecl *C = dyn_cast<ObjCCategoryDecl>(CDecl);
ObjCInterfaceDecl *PrimaryClass = 0;
@@ -1755,9 +1754,8 @@ void Sema::DiagnoseUnimplementedProperties(Scope *S, ObjCImplDecl* IMPDecl,
// When reporting on missing setter/getters, do not report when
// setter/getter is implemented in category's primary class
// implementation.
- for (ObjCImplementationDecl::instmeth_iterator
- I = IMP->instmeth_begin(), E = IMP->instmeth_end(); I!=E; ++I)
- InsMap.insert((*I)->getSelector());
+ for (const auto *I : IMP->instance_methods())
+ InsMap.insert(I->getSelector());
}
for (ObjCContainerDecl::PropertyMap::iterator
@@ -1900,10 +1898,9 @@ void Sema::DiagnoseMissingDesignatedInitOverrides(
return;
SelectorSet InitSelSet;
- for (ObjCImplementationDecl::instmeth_iterator
- I = ImplD->instmeth_begin(), E = ImplD->instmeth_end(); I!=E; ++I)
- if ((*I)->getMethodFamily() == OMF_init)
- InitSelSet.insert((*I)->getSelector());
+ for (const auto *I : ImplD->instance_methods())
+ if (I->getMethodFamily() == OMF_init)
+ InitSelSet.insert(I->getSelector());
SmallVector<const ObjCMethodDecl *, 8> DesignatedInits;
SuperD->getDesignatedInitializers(DesignatedInits);
OpenPOWER on IntegriCloud