libclang isn't listing all fields of a struct

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

libclang isn't listing all fields of a struct

Yvan Roux via cfe-dev
I have been trying to learn about the AST using python bindings of libclang. But I have not been able to enumerate the fields of a struct successfully. I don't know if I'm doing it wrong, or if it's a bug.


It simply prints the displayname, spelling, and number of fields of a struct.

And I am running it on the imgui.h file from the https://github.com/ocornut/imgui project.

For a lot of the structs, I get "fields count: 0". I wrote an equivalent program in C++. And I got the same result. How do I fix it?

I have cloned the clang repo from the provided git mirror. The latest commit in my clone is:
git commit id: 3b778bc3cec73f904457d70d6f956e1aafe1b550
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345691 91177308-0d34-0410-b5e6-96231b3b80d8

Thanks!


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev