[PATCH] Handling custom subjects in Attr.td

Richard Smith richard at metafoo.co.uk
Wed Nov 27 14:25:59 PST 2013


On Wed, Nov 27, 2013 at 6:55 AM, Aaron Ballman <aaron at aaronballman.com>wrote:

> This patch demonstrates the direction I was going to go with custom
> subject handling of attributes. It only handles the IBAction
> attribute, as that seemed like a simple place to start.
>
> When attempting to deduce the diagnostic argument, I am looking
> through to the SubsetSubject's Base member. However, I suspect most
> attributes will use the custom diagnostic logic for this.
>
> I am only generating the custom checking code once, and reusing it
> as-needed. Also, I am not attempting to support SubsetSubjects within
> SubsetSubjects at this point.


Tiny things:

Maybe call the checking function is$SubjectName, not just $SubjectName?
Maybe issue an error of the SubjectList contains a SubsetSubject but no
custom diagnostic, to guard against people doing that by accident?
Attributes can explicitly specify the non-subset diagnostic if that's what
they wanted.

Otherwise, LGTM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131127/65d0b124/attachment.html>


More information about the cfe-commits mailing list