bit-field information exposure in libclang API


I am new to clang and am trying to use it to parse C header files into an AST. I have been looking through the API’s Index.h file but cannot find any way to access bit-field information for struct field declarations. Basically I am looking for functions such as isBitField() and getBitWidth() that operate on CXCursor objects in order to access field information.

As far as I can see there is no access to this information through the libclang API, however I can see that these functions are available through the clang::FieldDecl class which is not part of the API. Have I misread the documentation, and the libclang API does provide access to this information? If the API does not provide this access, can someone help me by exposing it in the API?

I would do it myself, but I am still fairly new to this project and do not know the source very well. Thanks in advance for the help!


Can anyone help me answer this question?