[cfe-dev] Get the number of bits of a bit field with libclang?

Jacob Carlborg doob at me.com
Tue May 22 11:42:23 PDT 2012


Is it possible to get the number of bits of a bit field with libclang?

struct Foo
{
     int a : 1;
};

I noticed I could traverse to the "value" of "a" and the type of the 
cursor was CXCursor_IntegerLiteral. But is it possible to get the actual 
value?

-- 
/Jacob Carlborg




More information about the cfe-dev mailing list