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 | 96b098674908eaa59a9128f3305cda6fbbdad563 (patch) | |
tree | d57eea0d73104b14e3bd09e070657d2af8a29edd /lib/AST/CommentDumper.cpp | |
parent | 3c394c54511b27be0ff6968f159bba3521ab3c3e (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161087 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/CommentDumper.cpp')
-rw-r--r-- | lib/AST/CommentDumper.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/AST/CommentDumper.cpp b/lib/AST/CommentDumper.cpp index f02ea334cd..dffc8233a0 100644 --- a/lib/AST/CommentDumper.cpp +++ b/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); |