[PATCH] Handling custom subjects in Attr.td

Aaron Ballman aaron at aaronballman.com
Fri Nov 29 07:02:18 PST 2013


On Wed, Nov 27, 2013 at 5:25 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> 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?

Done.

> 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.

Done (though I did a non-fatal error since recovery is trivial).

Thanks!  Committed in r195960.

~Aaron



More information about the cfe-commits mailing list