diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-07 13:13:38 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-07 13:13:38 +0000 |
| commit | 7dce1a840cedee83c5f62dcb93b9a65b56823213 (patch) | |
| tree | 115c345ebe81b68e3b6ce11c269b397720d5d187 /clang/lib/AST | |
| parent | 690829696ca4c73a8cb1688761e9b1152a7d2254 (diff) | |
| download | bcm5719-llvm-7dce1a840cedee83c5f62dcb93b9a65b56823213.tar.gz bcm5719-llvm-7dce1a840cedee83c5f62dcb93b9a65b56823213.zip | |
Fully reverting r203236 -- it seems the only bots that are happy are the MSVC bots.
llvm-svn: 203237
Diffstat (limited to 'clang/lib/AST')
| -rw-r--r-- | clang/lib/AST/ASTDumper.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/AST/Decl.cpp | 4 | ||||
| -rw-r--r-- | clang/lib/AST/DeclBase.cpp | 14 |
3 files changed, 10 insertions, 10 deletions
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp index 810560d57fb..42edf5bb94d 100644 --- a/clang/lib/AST/ASTDumper.cpp +++ b/clang/lib/AST/ASTDumper.cpp @@ -762,7 +762,7 @@ void ASTDumper::dumpDecl(const Decl *D) { if (ND->isHidden()) OS << " hidden"; - bool HasAttrs = D->hasAttrs(); + bool HasAttrs = D->attr_begin() != D->attr_end(); const FullComment *Comment = D->getASTContext().getLocalCommentForDeclUncached(D); // Decls within functions are visited by the body diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 872a26d0226..6eaf1405501 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -3501,8 +3501,8 @@ LabelDecl *LabelDecl::CreateDeserialized(ASTContext &C, unsigned ID) { void ValueDecl::anchor() { } bool ValueDecl::isWeak() const { - for (auto I : attrs()) - if (isa<WeakAttr>(I) || isa<WeakRefAttr>(I)) + for (attr_iterator I = attr_begin(), E = attr_end(); I != E; ++I) + if (isa<WeakAttr>(*I) || isa<WeakRefAttr>(*I)) return true; return isWeakImported(); diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index 873e986d798..00692df46c5 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -408,8 +408,8 @@ AvailabilityResult Decl::getAvailability(std::string *Message) const { AvailabilityResult Result = AR_Available; std::string ResultMessage; - for (auto A : attrs()) { - if (auto Deprecated = dyn_cast<DeprecatedAttr>(A)) { + for (attr_iterator A = attr_begin(), AEnd = attr_end(); A != AEnd; ++A) { + if (DeprecatedAttr *Deprecated = dyn_cast<DeprecatedAttr>(*A)) { if (Result >= AR_Deprecated) continue; @@ -420,13 +420,13 @@ AvailabilityResult Decl::getAvailability(std::string *Message) const { continue; } - if (auto Unavailable = dyn_cast<UnavailableAttr>(A)) { + if (UnavailableAttr *Unavailable = dyn_cast<UnavailableAttr>(*A)) { if (Message) *Message = Unavailable->getMessage(); return AR_Unavailable; } - if (auto Availability = dyn_cast<AvailabilityAttr>(A)) { + if (AvailabilityAttr *Availability = dyn_cast<AvailabilityAttr>(*A)) { AvailabilityResult AR = CheckAvailability(getASTContext(), Availability, Message); @@ -482,11 +482,11 @@ bool Decl::isWeakImported() const { if (!canBeWeakImported(IsDefinition)) return false; - for (auto A : attrs()) { - if (isa<WeakImportAttr>(A)) + for (attr_iterator A = attr_begin(), AEnd = attr_end(); A != AEnd; ++A) { + if (isa<WeakImportAttr>(*A)) return true; - if (AvailabilityAttr *Availability = dyn_cast<AvailabilityAttr>(A)) { + if (AvailabilityAttr *Availability = dyn_cast<AvailabilityAttr>(*A)) { if (CheckAvailability(getASTContext(), Availability, 0) == AR_NotYetIntroduced) return true; |

