summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-08 22:19:01 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-08 22:19:01 +0000
commitb97112e4bd8bf9051822ca2b3d99115c683c2cae (patch)
tree7f78697a4a91e3ab33ee3396f5da6bcdc9b90fce /clang/lib/Sema/SemaObjCProperty.cpp
parent4203039760356c388745025b99b04ae52c4b5c49 (diff)
downloadbcm5719-llvm-b97112e4bd8bf9051822ca2b3d99115c683c2cae.tar.gz
bcm5719-llvm-b97112e4bd8bf9051822ca2b3d99115c683c2cae.zip
[C++11] Replacing Decl iterators attr_begin() and attr_end() with iterator_range attrs(). Updating all of the usages of the iterators with range-based for loops.
This is a reapplication of r203236 with modifications to the definition of attrs() and following the new style guidelines on auto usage. llvm-svn: 203362
Diffstat (limited to 'clang/lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--clang/lib/Sema/SemaObjCProperty.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp
index 78db05302ec..3a98f6324ae 100644
--- a/clang/lib/Sema/SemaObjCProperty.cpp
+++ b/clang/lib/Sema/SemaObjCProperty.cpp
@@ -1940,13 +1940,11 @@ void Sema::DiagnoseMissingDesignatedInitOverrides(
static void AddPropertyAttrs(Sema &S, ObjCMethodDecl *PropertyMethod,
ObjCPropertyDecl *Property) {
// Should we just clone all attributes over?
- for (Decl::attr_iterator A = Property->attr_begin(),
- AEnd = Property->attr_end();
- A != AEnd; ++A) {
- if (isa<DeprecatedAttr>(*A) ||
- isa<UnavailableAttr>(*A) ||
- isa<AvailabilityAttr>(*A))
- PropertyMethod->addAttr((*A)->clone(S.Context));
+ for (const auto *A : Property->attrs()) {
+ if (isa<DeprecatedAttr>(A) ||
+ isa<UnavailableAttr>(A) ||
+ isa<AvailabilityAttr>(A))
+ PropertyMethod->addAttr(A->clone(S.Context));
}
}
OpenPOWER on IntegriCloud