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

Stefaan Himpe stefaan.himpe at gmail.com
Sun Nov 13 13:20:07 PST 2011


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.




More information about the cfe-dev mailing list