ASTContext::getCommentForDecl: add comment.

llvm-svn: 162374
This commit is contained in:
Dmitri Gribenko 2012-08-22 18:12:19 +00:00
parent 2c0978a4ac
commit bfda9f75d6
1 changed files with 4 additions and 0 deletions

View File

@ -370,6 +370,10 @@ comments::FullComment *ASTContext::getCommentForDecl(const Decl *D) const {
if (!RC)
return NULL;
// If the RawComment was attached to other redeclaration of this Decl, we
// should parse the comment in context of that other Decl. This is important
// because comments can contain references to parameter names which can be
// different across redeclarations.
if (D != OriginalDecl)
return getCommentForDecl(OriginalDecl);