diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2012-07-31 22:37:06 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2012-07-31 22:37:06 +0000 |
commit | 34df220410b36fd6643154d3d6071bac74403da0 (patch) | |
tree | 1f73381a70095ae60f5ab0c1da8d76659f53547f /clang/lib/AST/CommentDumper.cpp | |
parent | 708709c01502e55f6fb49ad45f2c9266fc5eac1b (diff) | |
download | bcm5719-llvm-34df220410b36fd6643154d3d6071bac74403da0.tar.gz bcm5719-llvm-34df220410b36fd6643154d3d6071bac74403da0.zip |
Comment parsing: add support for \tparam command on all levels.
The only caveat is renumbering CXCommentKind enum for aesthetic reasons -- this
breaks libclang binary compatibility, but should not be a problem since API is
so new.
This also fixes PR13372 as a side-effect.
llvm-svn: 161087
Diffstat (limited to 'clang/lib/AST/CommentDumper.cpp')
-rw-r--r-- | clang/lib/AST/CommentDumper.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/lib/AST/CommentDumper.cpp b/clang/lib/AST/CommentDumper.cpp index f02ea334cd7..dffc8233a0c 100644 --- a/clang/lib/AST/CommentDumper.cpp +++ b/clang/lib/AST/CommentDumper.cpp @@ -50,6 +50,7 @@ public: void visitParagraphComment(const ParagraphComment *C); void visitBlockCommandComment(const BlockCommandComment *C); void visitParamCommandComment(const ParamCommandComment *C); + void visitTParamCommandComment(const TParamCommandComment *C); void visitVerbatimBlockComment(const VerbatimBlockComment *C); void visitVerbatimBlockLineComment(const VerbatimBlockLineComment *C); void visitVerbatimLineComment(const VerbatimLineComment *C); @@ -176,6 +177,24 @@ void CommentDumper::visitParamCommandComment(const ParamCommandComment *C) { OS << " ParamIndex=" << C->getParamIndex(); } +void CommentDumper::visitTParamCommandComment(const TParamCommandComment *C) { + dumpComment(C); + + if (C->hasParamName()) { + OS << " Param=\"" << C->getParamName() << "\""; + } + + if (C->isPositionValid()) { + OS << " Position=<"; + for (unsigned i = 0, e = C->getDepth(); i != e; ++i) { + OS << C->getIndex(i); + if (i != e - 1) + OS << ", "; + } + OS << ">"; + } +} + void CommentDumper::visitVerbatimBlockComment(const VerbatimBlockComment *C) { dumpComment(C); |