[cfe-dev] Using a Bit in the CXXRecordDecl Bitfield
John McCall
rjmccall at apple.com
Thu Jul 11 15:02:14 PDT 2013
On Jul 11, 2013, at 2:56 PM, Christian Wailes <chriswailes at google.com> wrote:
> My new analysis introduces annotations that are placed on class methods. I'd like a way to check types, as my analysis encounters variable declarations, to see if they have members marked with my annotations. I could iterate over all of the methods for record types to check for my annotations, but this seems expensive. The best way I can think of to accomplish this is to add a bool value to the CXXRecordDecl bitfield. I have two questions for the list: a) can anyone think of a better way to do this? and b) is there any objection to adding another bit to the field? If my count is correct there are currently 59 bits in the field.
If this is your own private branch, knock yourself out.
If you want this in trunk, then I think you should probably just keep a set of declarations on the side.
John.
More information about the cfe-dev
mailing list