On Tue, Nov 19, 2013 at 9:03 PM, Richard Smith <[email protected]> wrote:
> Well, if there's no current attribute that will trigger these new messages,
> I suppose testing can wait.

Ah, no, there are no attributes that require these. This was fixing up
a bug introduced by Fariborz's recent ObjC attribute changes. He added
some new error enumerants, but forgot to add the warning variants. I
was merely keeping the two in sync so the enumerations would remain
valid.

> As an aside, our diagnostic tablegen system could really use a mechanism to
> define these enumerated lists. I'd love to be able to write something like
>
> def AttrRecipient : Select<"attr_recipient",
>   [SelectVal<"VarFunctionAndLabel", "varaibles, functions, and labels">,
>    SelectVal<"FieldsAndGlobals", "fields and global variables">,
>    // ...
>   ]
>>;
> def err_foo : Error<"%0 attribute only aplpies to
> %select<attr_recipient>1">;
>
> ... where this would generate both the diagnostic with a proper %select and
> also an enumerated type for the attribute argument.

That *would* be handy indeed...

~Aaron
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to