summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Decl.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/AST/Decl.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/AST/Decl.cpp')
-rw-r--r--clang/lib/AST/Decl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 1a8748ccfd0..eaaf9277514 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -3499,8 +3499,8 @@ LabelDecl *LabelDecl::CreateDeserialized(ASTContext &C, unsigned ID) {
void ValueDecl::anchor() { }
bool ValueDecl::isWeak() const {
- for (attr_iterator I = attr_begin(), E = attr_end(); I != E; ++I)
- if (isa<WeakAttr>(*I) || isa<WeakRefAttr>(*I))
+ for (const auto *I : attrs())
+ if (isa<WeakAttr>(I) || isa<WeakRefAttr>(I))
return true;
return isWeakImported();
OpenPOWER on IntegriCloud