]> granicus.if.org Git - clang/commitdiff
ASTContext::getCommentForDecl: add comment.
authorDmitri Gribenko <gribozavr@gmail.com>
Wed, 22 Aug 2012 18:12:19 +0000 (18:12 +0000)
committerDmitri Gribenko <gribozavr@gmail.com>
Wed, 22 Aug 2012 18:12:19 +0000 (18:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162374 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTContext.cpp

index adb06147faa2c447bd6d90af53219dd7f3d45da9..1144fcd0d97096ee44684353f9387d7f93715034 100644 (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);