[cfe-dev] Parsing headers with libclang and retrieve information

David Röthlisberger david at rothlis.net
Thu Apr 11 02:59:37 PDT 2013


On 11 Apr 2013, at 10:12, Matthieu Brucher wrote:
> 
> I've started with the Python bindings, but I couldn't figure out several things:

Are you using ipython? I find ipython's tab-completion is an
excellent way of discovering the libclang API. See for example
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-August/023449.html


> - when I get a type like std::vector<something>, with display name I can get vector<something>, but I never can retrieve the std::. Is there a way of doing so?

Here's how clang-ctags does it:
https://github.com/drothlis/clang-ctags/blob/8ecf1306/clang-ctags#L83


> Will the current bindings be upgraded at some point? (for instance, I've a binding with a better AccessSpecifier handling mecanism)

I'm sure the maintainers are open to patches. :-)

--Dave.





More information about the cfe-dev mailing list