summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2012-08-22 18:12:19 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2012-08-22 18:12:19 +0000
commitbfda9f75d6f74a962b12717daaaa8243dc6d6e4e (patch)
tree2dcd3062546dc0f59060f3dc93f54f690340c143 /clang
parent2c0978a4acb6e98d147da7a8a62de52ae38b40f2 (diff)
downloadbcm5719-llvm-bfda9f75d6f74a962b12717daaaa8243dc6d6e4e.tar.gz
bcm5719-llvm-bfda9f75d6f74a962b12717daaaa8243dc6d6e4e.zip
ASTContext::getCommentForDecl: add comment.
llvm-svn: 162374
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/AST/ASTContext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index adb06147faa..1144fcd0d97 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -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);
OpenPOWER on IntegriCloud