[cfe-commits] r165807 - /cfe/trunk/lib/AST/CommentDumper.cpp
Fariborz Jahanian
fjahanian at apple.com
Fri Oct 12 10:28:36 PDT 2012
Author: fjahanian
Date: Fri Oct 12 12:28:36 2012
New Revision: 165807
URL: http://llvm.org/viewvc/llvm-project?rev=165807&view=rev
Log:
Add dump support for comments coming from
overridden symbols. OK'ed off-line by Doug.
// rdar://12378793
Modified:
cfe/trunk/lib/AST/CommentDumper.cpp
Modified: cfe/trunk/lib/AST/CommentDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CommentDumper.cpp?rev=165807&r1=165806&r2=165807&view=diff
==============================================================================
--- cfe/trunk/lib/AST/CommentDumper.cpp (original)
+++ cfe/trunk/lib/AST/CommentDumper.cpp Fri Oct 12 12:28:36 2012
@@ -19,12 +19,16 @@
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 @@
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 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';
}
More information about the cfe-commits
mailing list