aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-02-28 17:47:14 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-02-28 17:47:14 +0000
commitb98f7af5685458a00d4efd60429378efe88ad10f (patch)
treea6ee267ea5cf994691c0250921801b095de6c5d8 /lib/Sema/SemaCodeComplete.cpp
parent25e81b255cea00fe633f2822c1d1d708ef871a59 (diff)
objective-C code completion. Property accessors may not
have their own code completion comments. Use those in their properties in this case. // rdar://12791315 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176271 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--lib/Sema/SemaCodeComplete.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index 2cc7b85a7f..e20330b502 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/lib/Sema/SemaCodeComplete.cpp
@@ -2605,7 +2605,12 @@ CodeCompletionResult::CreateCodeCompletionString(ASTContext &Ctx,
// Add documentation comment, if it exists.
if (const RawComment *RC = Ctx.getRawCommentForAnyRedecl(ND)) {
Result.addBriefComment(RC->getBriefText(Ctx));
- }
+ }
+ else if (const ObjCMethodDecl *OMD = dyn_cast<ObjCMethodDecl>(ND))
+ if (OMD->isPropertyAccessor())
+ if (const ObjCPropertyDecl *PDecl = OMD->findPropertyDecl())
+ if (const RawComment *RC = Ctx.getRawCommentForAnyRedecl(PDecl))
+ Result.addBriefComment(RC->getBriefText(Ctx));
}
if (StartsNestedNameSpecifier) {