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/tools/c-index-test/c-index-test.c | |
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/tools/c-index-test/c-index-test.c')
-rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index 9f270f0151c..4af25488953 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -378,6 +378,23 @@ static void DumpCXCommentInternal(struct CommentASTDumpingContext *Ctx, else printf(" ParamIndex=Invalid"); break; + case CXComment_TParamCommand: + printf("CXComment_TParamCommand"); + PrintCXStringWithPrefixAndDispose( + "ParamName", + clang_TParamCommandComment_getParamName(Comment)); + if (clang_TParamCommandComment_isParamPositionValid(Comment)) { + printf(" ParamPosition={"); + for (i = 0, e = clang_TParamCommandComment_getDepth(Comment); + i != e; ++i) { + printf("%u", clang_TParamCommandComment_getIndex(Comment, i)); + if (i != e - 1) + printf(", "); + } + printf("}"); + } else + printf(" ParamPosition=Invalid"); + break; case CXComment_VerbatimBlockCommand: printf("CXComment_VerbatimBlockCommand"); PrintCXStringWithPrefixAndDispose( |