summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erikjv@me.com>2011-10-14 15:31:08 +0000
committerErik Verbruggen <erikjv@me.com>2011-10-14 15:31:08 +0000
commit98ea7f6737834029b60081105b73e6f5c7c420e9 (patch)
tree8326cac88c8962e1f1218078fd63227acbe9d692 /clang/lib/Sema/SemaCodeComplete.cpp
parenta447e0f38f9236a61407ebed49cd16d08ddb3676 (diff)
downloadbcm5719-llvm-98ea7f6737834029b60081105b73e6f5c7c420e9.tar.gz
bcm5719-llvm-98ea7f6737834029b60081105b73e6f5c7c420e9.zip
Added clang_getCompletionAnnotation and clang_getCompletionNumAnnotations to
retrieve annotations from completion string. llvm-svn: 141953
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--clang/lib/Sema/SemaCodeComplete.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index 56b351c4cfb..405d626ae9b 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -2424,6 +2424,12 @@ CodeCompletionResult::CreateCodeCompletionString(Sema &S,
Result.AddTextChunk("::");
return Result.TakeString();
}
+
+ 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(S.Context, Policy, ND, Result);
OpenPOWER on IntegriCloud