[cfe-dev] contributing a Python class representation for C++ code to LLVM

Vedant Kumar via cfe-dev cfe-dev at lists.llvm.org
Tue Nov 10 21:46:15 PST 2015


Hi Jonathan,

This looks pretty useful.

I'd like to see parts of cppmodel.py adapted and added as tests to clang/bindings/python/tests/cindex. I only took a cursory look, but it seems that there may be a few things your code covers that our tests don't. E.g cindex.CursorKind.NAMESPACE.

I don't think pulling the interface-generator itself into clang is feasible due to the maintenance overhead. Have you thought about integrating it with swig?

thanks
vedant

> On Nov 6, 2015, at 3:54 PM, Jonathan Coe via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> I've been working on some python classes to simply represent C++ code. It's build using the AST and libclang's Python bindings:
> 
> https://github.com/jbcoe/clang_cpp_code_model
> 
> I'm using it to drive a very rudimentary code generator (It can build test mocks and basic C/C++/Python bindings):
> 
> https://github.com/jbcoe/C_API_generation
> 
> Are either of these projects of interest to the broader LLVM development community? I appreciate that a lot of work would be required, but I would be interested in contributing the code model (and potentially the generator) to the LLVM project.
> 
> regards,
> 
> Jonathan
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list