[cfe-dev] Python bindings and status of clang-c API

Stuart Carnie stuart.carnie at gmail.com
Wed Jan 26 12:32:45 PST 2011

Hi all,

I notice the cindex module is very outdated, so I decided to have a play
last night and added a significant amount of the missing CursorKind statics
as well as the start of exposing CXType.  In my experimentation, I've
noticed is that there appears to be many missing CXCursorKind enums in the
clang-c/Index.h header.  As an example, I declared a small function in a
test file:

void f0(int a0, int a1) {

There are 3 children of f0, kinds being CXCursor_ParmDecl,
CXCursor_ParmDecl, CXCursor_UnexposedStatement.  I assume the 3rd node is
the function body.  I don't think the python code is doing anything wrong
when visiting the children.  I looked at MakeCSCursor(Stmt *S, ...) in
CXCursor.cpp (libclang) and noticed that the function is are largely
un-implemented.  I can walk down and find the CallExpr (f1();).

Is this an area I could do some work in?  Having complete python bindings
for the entire AST would be a great way to learn clang...



*Stuart Carnie, CTO*
*manomio <http://manomio.com/> | in retro we trust!*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110126/296476bb/attachment.html>

More information about the cfe-dev mailing list