From a43ec186a4a1351efd881a2c823773b6d437f9cb 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. llvm-svn: 161722 --- clang/lib/Sema/SemaCodeComplete.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Sema/SemaCodeComplete.cpp') diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp index 2e099e96a4f..9fa757d50a2 100644 --- a/clang/lib/Sema/SemaCodeComplete.cpp +++ b/clang/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