[PATCH] Declaring standard C++ attributes

Aaron Ballman aaron at aaronballman.com
Wed Jan 29 15:12:52 PST 2014


On Wed, Jan 29, 2014 at 6:11 PM, Richard Smith <metafoo at gmail.com> wrote:
> On Wed Jan 29 2014 at 1:17:50 PM, Aaron Ballman <aaron at aaronballman.com>
> wrote:
>>
>> On Wed, Jan 29, 2014 at 4:01 PM, Richard Smith <metafoo at gmail.com> wrote:
>> > On Wed Jan 29 2014 at 12:54:14 PM, Aaron Ballman
>> > <aaron at aaronballman.com>
>> > wrote:
>> >>
>> >> On Wed, Jan 29, 2014 at 3:45 PM, Richard Smith <metafoo at gmail.com>
>> >> wrote:
>> >> > I'm not really sure what this is for: don't we want to have a flag
>> >> > for
>> >> > 'cannot have parens' rather than 'is a standardized C++ attribute'?
>> >>
>> >> Since standardized C++ attributes all have custom parsing rules (some
>> >> can have parens, some can't, and the future holds mystery), I think it
>> >> makes sense to have two cases: things which the standard mandates the
>> >> parsing rules for, and things which can be generically parsed.
>> >
>> >
>> > So this flag is (at best) misnamed, then, since we want the generic
>> > parsing
>> > logic for [[deprecated]]?
>>
>> We don't want generic parsing logic for [[deprecated]] because it's a
>> standards-based attribute (in C++1y). We need to error out at parse
>> time if it's ill-formed, don't we?
>
>
> We need to diagnose it somewhere. It could be in Sema -- that's what we do
> for all other attributes, and I don't see any need to be inconsistent here.
>
>>
>> I think the flag is properly-named based on what I was intending --
>> identify which attributes are C++ standards-based attributes.
>
>
> When is that useful?

As best I can tell: never. That's why I'm retracting my patch. ;-)

~Aaron



More information about the cfe-commits mailing list