[cfe-dev] libclang python bindings - how to force C++ mode ?

Nikola Smiljanic popizdeh at gmail.com
Sun Nov 13 23:40:25 PST 2011


Try passing "-x c++" to the parser.

On Sun, Nov 13, 2011 at 10:20 PM, Stefaan Himpe <stefaan.himpe at gmail.com>wrote:

> Hi,
>
> I'm experimenting with the python bindings for libclang.
> (I'm keeping it simple for now: I'm trying out the example
>  cindex-dump.py script)
>
> I've noticed that if I pass a .h file it is parsed in C mode,
> whereas if I rename it to .hpp it is parsed in C++ mode.
>
> My question is: can I force C++ mode for a .h file (without renaming it)
> ? (And the follow-up question is: How?)
>
>
> Thanks,
> Stefaan.
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111114/b20b5da0/attachment.html>


More information about the cfe-dev mailing list