[cfe-dev] Status/Future of libclang

Milian Wolff via cfe-dev cfe-dev at lists.llvm.org
Sun Jul 10 15:26:42 PDT 2016


On Freitag, 8. Juli 2016 21:10:30 CEST Jonathan Müller via cfe-dev wrote:
> Hello,
> 
> I'm working on a C++ documentation generator "standardese"
> (https://github.com/foonathan/standardese/). I'm using libclang for parsing.
> 
> Unfortunately I've run into an issue with it: the API isn't providing me
> all the information that I need. There are things that aren't exposed by
> the API, for example whether a constructor is explicit, a function
> constexpr, or the noexcept expression.
> 
> I was forced to go to manual parsing of the source code of a cursor by
> tokenizing it with the help of Boost.Wave (because libclang doesn't give
> me the preprocessed tokens). This worked relatively good but I now ran
> into an issue with template specializations (parsing `template <> class
> c<a < b> {};), so my naive approach doesn't work anymore and I'd need to
> write a fully fledged parser.
> 
> I've also encountered a few things that might be bugs.
> I can report those, but when looking at
> https://llvm.org/bugs/buglist.cgi?product=clang&component=libclang&resolutio
> n=---&list_id=100919, there are almost only unassigned, NEW bugs.
> 
> I would volunteer to maintain it myself but I have no experience with
> the internal APIs or the clang project and I'm lacking the time to learn
> them *and* work on standardese.
> 
> So my question: Is there someone actively maintaining libclang? What are
> the future plans for the API?
> If there is someone I'll provide active feedback and feature requests.

From my experience working with libclang on KDevelop, I got the feeling that 
libclang is a community project. If you spot any issues, simply fix them by 
providing a patch on reviewboard. People are willing to review and so far the  
most pressing issues we encountered got fixed upstream.

For the stuff that is not exposed, it's usually trivial to add the support to 
libclang. Mostly a matter of writing a unit test (which is also pretty easy), 
and then forwarding the C++ API via some C wrappers.

Cheers, hope to see some patches to review!
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160711/c682e58c/attachment.sig>


More information about the cfe-dev mailing list