aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/CommentDumper.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-10-12 17:28:36 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-10-12 17:28:36 +0000
commit71793ef10d3a0ab009a9c070ab413a6afc9f3f8c (patch)
treef1a1ad4cc13b1035116b028b0c0e4c4c834fb9f5 /lib/AST/CommentDumper.cpp
parent3c5527e939c454bfd3e16354908e0c4315be5d2f (diff)
Add dump support for comments coming from
overridden symbols. OK'ed off-line by Doug. // rdar://12378793 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165807 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/CommentDumper.cpp')
-rw-r--r--lib/AST/CommentDumper.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/AST/CommentDumper.cpp b/lib/AST/CommentDumper.cpp
index f9050d5f71..36261c423b 100644
--- a/lib/AST/CommentDumper.cpp
+++ b/lib/AST/CommentDumper.cpp
@@ -19,12 +19,16 @@ class CommentDumper: public comments::ConstCommentVisitor<CommentDumper> {
const CommandTraits *Traits;
const SourceManager *SM;
unsigned IndentLevel;
-
+ const FullComment *FC;
+
public:
CommentDumper(raw_ostream &OS,
const CommandTraits *Traits,
- const SourceManager *SM) :
- OS(OS), Traits(Traits), SM(SM), IndentLevel(0)
+ const SourceManager *SM,
+ const FullComment * FC) :
+ OS(OS), Traits(Traits), SM(SM), IndentLevel(0),
+ FC(FC)
+
{ }
void dumpIndent() const {
@@ -183,7 +187,7 @@ void CommentDumper::visitParamCommandComment(const ParamCommandComment *C) {
OS << " implicitly";
if (C->hasParamName())
- OS << " Param=\"" << C->getParamName(0) << "\"";
+ OS << " Param=\"" << C->getParamName(const_cast<FullComment*>(FC)) << "\"";
if (C->isParamIndexValid())
OS << " ParamIndex=" << C->getParamIndex();
@@ -234,7 +238,8 @@ void CommentDumper::visitFullComment(const FullComment *C) {
void Comment::dump(llvm::raw_ostream &OS, const CommandTraits *Traits,
const SourceManager *SM) const {
- CommentDumper D(llvm::errs(), Traits, SM);
+ const FullComment *FC = dyn_cast<FullComment>(this);
+ CommentDumper D(llvm::errs(), Traits, SM, FC);
D.dumpSubtree(this);
llvm::errs() << '\n';
}