diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-02-28 17:47:14 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-02-28 17:47:14 +0000 |
commit | 15a0b55c979cfb8a8294887e3f1c865f4f036616 (patch) | |
tree | 90e675ff7673e305a9563c3f7dd6a387fde44e45 /clang/lib/Sema/SemaCodeComplete.cpp | |
parent | d4842e5ee9ecb85f1ff08601cea1db6a8a035050 (diff) | |
download | bcm5719-llvm-15a0b55c979cfb8a8294887e3f1c865f4f036616.tar.gz bcm5719-llvm-15a0b55c979cfb8a8294887e3f1c865f4f036616.zip |
objective-C code completion. Property accessors may not
have their own code completion comments. Use those in
their properties in this case.
// rdar://12791315
llvm-svn: 176271
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r-- | clang/lib/Sema/SemaCodeComplete.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp index 2cc7b85a7f5..e20330b5028 100644 --- a/clang/lib/Sema/SemaCodeComplete.cpp +++ b/clang/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) { |