[cfe-dev] Using a Bit in the CXXRecordDecl Bitfield

Christian Wailes chriswailes at google.com
Fri Jul 12 11:40:29 PDT 2013


Would there be any objection to me adding a data member to the
sema::AnalysisBasedWarnings class instead?  It would be used to cache some
information and speed up the analysis.

And yes, we would like this to eventually be merged into trunk.

- Chris


On Thu, Jul 11, 2013 at 3:02 PM, John McCall <rjmccall at apple.com> wrote:

> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130712/3a9a3424/attachment.html>


More information about the cfe-dev mailing list