[cfe-dev] libclang interface for comments AST

Dmitri Gribenko gribozavr at gmail.com
Mon Jul 16 12:48:59 PDT 2012


Hello,

I am designing a libclang interface to expose comments ASTs.  Attached
is a patch for Index.h.

The API has node traversal APIs and APIs to get various properties of the nodes.

I am not sure about error handling.  For example,
clang_InlineCommandComment_getCommandName is not applicable to a
CXComment_Text AST node.  I think that this should abort() right away,
but I don't see any other libclang APIs doing that -- they try to
return some bogus value instead.

I just want to get some general feedback if this is the right
direction and if there is something obviously missing.

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.patch
Type: application/octet-stream
Size: 9910 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120716/b40ea8f4/attachment.obj>


More information about the cfe-dev mailing list