diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2012-07-20 21:34:34 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2012-07-20 21:34:34 +0000 |
commit | ae99b75fbbac1deaccdcc1b326b8fb6b07a1e72d (patch) | |
tree | 0824998fc8d29311746310ca98ededcf0416d4d5 /include/clang/AST/CommentVisitor.h | |
parent | 0cfe9a1ceb8c4e60a9deb91003c04aba3ec9eade (diff) |
Add libclang APIs to walk comments ASTs and an API to convert a comment to an
HTML fragment.
For testing, c-index-test now has even more output:
* HTML rendering of a comment
* comment AST tree dump in S-expressions like Comment::dump(), but implemented
* with libclang APIs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160577 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/CommentVisitor.h')
-rw-r--r-- | include/clang/AST/CommentVisitor.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/AST/CommentVisitor.h b/include/clang/AST/CommentVisitor.h index 159725af26..47867a634f 100644 --- a/include/clang/AST/CommentVisitor.h +++ b/include/clang/AST/CommentVisitor.h @@ -24,6 +24,9 @@ public: return static_cast<ImplClass*>(this)->visit ## NAME(static_cast<PTR(CLASS)>(C)) RetTy visit(PTR(Comment) C) { + if (!C) + return RetTy(); + switch (C->getCommentKind()) { default: llvm_unreachable("Unknown comment kind!"); #define ABSTRACT_COMMENT(COMMENT) |