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/tools | |
| 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/tools')
| -rw-r--r-- | clang/tools/libclang/CIndex.cpp | 14 | ||||
| -rw-r--r-- | clang/tools/libclang/IndexingContext.cpp | 4 |
2 files changed, 11 insertions, 7 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 98563078447..1c24e6b7b27 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -1675,8 +1675,9 @@ bool CursorVisitor::VisitCXXRecordDecl(CXXRecordDecl *D) { } bool CursorVisitor::VisitAttributes(Decl *D) { - for (auto I : D->attrs()) - if (Visit(MakeCXCursor(I, D, TU))) + for (AttrVec::const_iterator i = D->attr_begin(), e = D->attr_end(); + i != e; ++i) + if (Visit(MakeCXCursor(*i, D, TU))) return true; return false; @@ -6040,8 +6041,9 @@ static int getCursorPlatformAvailabilityForDecl(const Decl *D, int availability_size) { bool HadAvailAttr = false; int N = 0; - for (auto A : D->attrs()) { - if (DeprecatedAttr *Deprecated = dyn_cast<DeprecatedAttr>(A)) { + for (Decl::attr_iterator A = D->attr_begin(), AEnd = D->attr_end(); A != AEnd; + ++A) { + if (DeprecatedAttr *Deprecated = dyn_cast<DeprecatedAttr>(*A)) { HadAvailAttr = true; if (always_deprecated) *always_deprecated = 1; @@ -6050,7 +6052,7 @@ static int getCursorPlatformAvailabilityForDecl(const Decl *D, continue; } - if (UnavailableAttr *Unavailable = dyn_cast<UnavailableAttr>(A)) { + if (UnavailableAttr *Unavailable = dyn_cast<UnavailableAttr>(*A)) { HadAvailAttr = true; if (always_unavailable) *always_unavailable = 1; @@ -6060,7 +6062,7 @@ static int getCursorPlatformAvailabilityForDecl(const Decl *D, continue; } - if (AvailabilityAttr *Avail = dyn_cast<AvailabilityAttr>(A)) { + if (AvailabilityAttr *Avail = dyn_cast<AvailabilityAttr>(*A)) { HadAvailAttr = true; if (N < availability_size) { availability[N].Platform diff --git a/clang/tools/libclang/IndexingContext.cpp b/clang/tools/libclang/IndexingContext.cpp index c5f20e0b383..2e0f7c20fc7 100644 --- a/clang/tools/libclang/IndexingContext.cpp +++ b/clang/tools/libclang/IndexingContext.cpp @@ -67,7 +67,9 @@ AttrListInfo::AttrListInfo(const Decl *D, IndexingContext &IdxCtx) if (!D->hasAttrs()) return; - for (auto A : D->attrs()) { + for (AttrVec::const_iterator AttrI = D->attr_begin(), AttrE = D->attr_end(); + AttrI != AttrE; ++AttrI) { + const Attr *A = *AttrI; CXCursor C = MakeCXCursor(A, D, IdxCtx.CXTU); CXIdxLoc Loc = IdxCtx.getIndexLoc(A->getLocation()); switch (C.kind) { |

