diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-08 22:19:01 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-08 22:19:01 +0000 |
commit | b97112e4bd8bf9051822ca2b3d99115c683c2cae (patch) | |
tree | 7f78697a4a91e3ab33ee3396f5da6bcdc9b90fce /clang/lib/AST/Decl.cpp | |
parent | 4203039760356c388745025b99b04ae52c4b5c49 (diff) | |
download | bcm5719-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.cpp | 4 |
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(); |