summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-07 13:13:38 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-07 13:13:38 +0000
commit7dce1a840cedee83c5f62dcb93b9a65b56823213 (patch)
tree115c345ebe81b68e3b6ce11c269b397720d5d187 /clang/lib/Sema/SemaCodeComplete.cpp
parent690829696ca4c73a8cb1688761e9b1152a7d2254 (diff)
downloadbcm5719-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/Sema/SemaCodeComplete.cpp')
-rw-r--r--clang/lib/Sema/SemaCodeComplete.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index 887b93ab58c..28f85d7a9f1 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -2638,11 +2638,12 @@ CodeCompletionResult::CreateCodeCompletionString(ASTContext &Ctx,
return Result.TakeString();
}
- for (auto i = ND->specific_attr_begin<AnnotateAttr>(),
- e = ND->specific_attr_end<AnnotateAttr>(); i != e; ++i)
- Result.AddAnnotation(
- Result.getAllocator().CopyString((*i)->getAnnotation()));
-
+ for (Decl::attr_iterator i = ND->attr_begin(); i != ND->attr_end(); ++i) {
+ if (AnnotateAttr *Attr = dyn_cast_or_null<AnnotateAttr>(*i)) {
+ Result.AddAnnotation(Result.getAllocator().CopyString(Attr->getAnnotation()));
+ }
+ }
+
AddResultTypeChunk(Ctx, Policy, ND, Result);
if (const FunctionDecl *Function = dyn_cast<FunctionDecl>(ND)) {
OpenPOWER on IntegriCloud