[cfe-dev] @interface and attributes

Nico Weber thakis at chromium.org
Wed Apr 3 10:00:11 PDT 2013


On Wed, Apr 3, 2013 at 9:57 AM, jahanian <fjahanian at apple.com> wrote:

> Ahy did you remove test/Parser/prefix-attributes.m test?
>

I moved it to test/Parser/attributes.mm (since it now also tests postfix
attributes).


> Other than that lgtm.
>

Thanks!


> - Fariborz
>
> On Apr 3, 2013, at 8:44 AM, Nico Weber <thakis at chromium.org> wrote:
>
> On Wed, Apr 3, 2013 at 1:00 AM, John McCall <rjmccall at apple.com> wrote:
>
>> On Apr 2, 2013, at 7:51 PM, Nico Weber <thakis at chromium.org> wrote:
>> > it's
>> >
>> >     class __attribute__((visibility("hidden"))) A {};
>> >
>> > but
>> >
>> >     __attribute__((visibility("hidden"))) @interface I @end
>> >
>> > In the first case, clang emits a nice fixit if the attribute is written
>> before the class keyword, while putting the attribute after @interface
>> makes clang print an ugly diagnostic.
>> >
>> > Instead of just making that print a nice fixit too, what do you think
>> about allowing attributes for @interfaces after the @interface keyword too?
>>
>> I see no reason to introduce confusion about where to put attributes in
>> an @interface.  It's not like after the @interface is actually a good place
>> to put attributes.
>>
>
> Ok. The attached patch gives attributes after an objc directive a nicer
> diagnostic then. Is this ok?
>
> Nico
>
>
>>
>> John.
>>
>
> <clang-objc-attrs.patch>_______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130403/fe8a7aa9/attachment.html>


More information about the cfe-dev mailing list