[cfe-dev] bit-field information exposure in libclang API

Bob Cvengros rcvengr2 at gmail.com
Wed Apr 4 11:01:13 PDT 2012


Can anyone help me answer this question?

Thanks,
Bob
On Mar 30, 2012 4:15 PM, "Bob Cvengros" <rcvengr2 at gmail.com> wrote:

> Hello,
>
> 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!
>
> Regards,
> Bob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120404/cd364cf0/attachment.html>


More information about the cfe-dev mailing list