From f50555eedef33fd5a67d369aa0ae8a6f1d201543 Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Sat, 11 Aug 2012 00:51:43 +0000 Subject: Attaching comments to declarations: find comment attached to any redeclaration Not only look for the comment near the declaration itself, but also walk the redeclaration chain: the previous declaration might have had a documentation comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161722 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaCodeComplete.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Sema/SemaCodeComplete.cpp') diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index 2e099e96a4..9fa757d50a 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/lib/Sema/SemaCodeComplete.cpp @@ -2543,7 +2543,7 @@ CodeCompletionResult::CreateCodeCompletionString(ASTContext &Ctx, if (IncludeBriefComments) { // Add documentation comment, if it exists. - if (const RawComment *RC = Ctx.getRawCommentForDecl(ND)) { + if (const RawComment *RC = Ctx.getRawCommentForAnyRedecl(ND)) { Result.addBriefComment(RC->getBriefText(Ctx)); } } -- cgit v1.2.3