summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-03-23 01:10:45 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-03-23 01:10:45 +0000
commitbe8bc67b66f73f3ee22a01e960439b103cd96cd6 (patch)
tree5d5964facb71fd0af952a21f8d8bfd5ec67f02f9 /clang/lib
parent4d96c8d7140b95ac2608422b59c9749a0c5b6981 (diff)
downloadbcm5719-llvm-be8bc67b66f73f3ee22a01e960439b103cd96cd6.tar.gz
bcm5719-llvm-be8bc67b66f73f3ee22a01e960439b103cd96cd6.zip
documentation parsing: when providing code completion comment
for a getter used in property-dot syntax, if geter has its own comment use it. // rdar://12791315 llvm-svn: 177797
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaCodeComplete.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index 1cb264265aa..34c83edcde7 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -2550,11 +2550,18 @@ CodeCompletionResult::CreateCodeCompletionString(ASTContext &Ctx,
if (M->isPropertyAccessor())
if (const ObjCPropertyDecl *PDecl = M->findPropertyDecl())
if (PDecl->getGetterName() == M->getSelector() &&
- PDecl->getIdentifier() != M->getIdentifier())
- if (const RawComment *RC = Ctx.getRawCommentForAnyRedecl(PDecl)) {
+ PDecl->getIdentifier() != M->getIdentifier()) {
+ if (const RawComment *RC =
+ Ctx.getRawCommentForAnyRedecl(M)) {
Result.addBriefComment(RC->getBriefText(Ctx));
Pattern->BriefComment = Result.getBriefComment();
}
+ else if (const RawComment *RC =
+ Ctx.getRawCommentForAnyRedecl(PDecl)) {
+ Result.addBriefComment(RC->getBriefText(Ctx));
+ Pattern->BriefComment = Result.getBriefComment();
+ }
+ }
}
return Pattern;
OpenPOWER on IntegriCloud