diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2012-08-11 00:51:43 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2012-08-11 00:51:43 +0000 |
commit | a43ec186a4a1351efd881a2c823773b6d437f9cb (patch) | |
tree | f94b7a8b2f6e866e3cedcfb2c4a58d2c16f5a437 /clang/lib/Sema/SemaCodeComplete.cpp | |
parent | 7f4c7430f7412a697caabf31815686eba1490afa (diff) | |
download | llvm-a43ec186a4a1351efd881a2c823773b6d437f9cb.zip llvm-a43ec186a4a1351efd881a2c823773b6d437f9cb.tar.gz llvm-a43ec186a4a1351efd881a2c823773b6d437f9cb.tar.bz2 |
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
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r-- | clang/lib/Sema/SemaCodeComplete.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp index 2e099e9..9fa757d 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)); } } |