diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2012-10-12 17:28:36 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-10-12 17:28:36 +0000 |
| commit | e87f41f43e5d5dafa5794a1f78c849a774ea989a (patch) | |
| tree | 4a0e78b0e5e8408062da53d411992f8cc6f4d73d /clang/lib/AST/CommentDumper.cpp | |
| parent | df3df25a71eca65cdb4cfaafd801ccaa57a66d4d (diff) | |
| download | bcm5719-llvm-e87f41f43e5d5dafa5794a1f78c849a774ea989a.tar.gz bcm5719-llvm-e87f41f43e5d5dafa5794a1f78c849a774ea989a.zip | |
Add dump support for comments coming from
overridden symbols. OK'ed off-line by Doug.
// rdar://12378793
llvm-svn: 165807
Diffstat (limited to 'clang/lib/AST/CommentDumper.cpp')
| -rw-r--r-- | clang/lib/AST/CommentDumper.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/clang/lib/AST/CommentDumper.cpp b/clang/lib/AST/CommentDumper.cpp index f9050d5f71a..36261c423be 100644 --- a/clang/lib/AST/CommentDumper.cpp +++ b/clang/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'; } |

