[cfe-dev] [PATCH] libclang interface for comments AST

Dmitri Gribenko gribozavr at gmail.com
Thu Jul 19 14:18:36 PDT 2012


Hello,

The attached patch adds libclang APIs to walk comments ASTs and an API
to convert a comment to an HTML fragment.

I implemented error handling as returning bogus-but-safe values.  I am
still concerned about this, because if the programmer misuses the API,
libclang will work around that silently.  It could be a good idea to
add some opt-in debug output for libclang to scream in such cases.

For testing I implemented an equivalent of Comment::dump() with these
new APIs in c-index-test.

Please review.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libclang-comments-interface-v2.patch
Type: application/octet-stream
Size: 64480 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120719/8bb0a265/attachment.obj>


More information about the cfe-dev mailing list