r205024 - Objective-C. revert r204965. This will make
jahanian
fjahanian at apple.com
Fri Mar 28 16:37:42 PDT 2014
On Mar 28, 2014, at 4:16 PM, jahanian <fjahanian at apple.com> wrote:
> Thanks Nico for our quick feedback. Our thinking is currently to allow extra paren around the selector name
> to suppress the warning. In addition, the warning will have the fix-it to suggest how to suppress the warning.
>
> For example:
> @selector((“selector”))
>
> This is precedented by -Wparenthesis:
> if ((p = foo()) { … }
>
> In the meantime, I will revert the revert till I get the time to implement this (or any other proposal).
>
> - Fariborz
>
> On Mar 28, 2014, at 11:59 AM, Nico Weber <thakis at chromium.org> wrote:
>
>> Can you share the idea for the fix-it? And maybe this shouldn't be on by default until the fix-it is implemented?
>>
>> As is, this will warn if someone writes @selector(length) and includes Cocoa, which doesn't seem very unlikely – and warning on that without a workaround doesn't seem useful.
Btw, maybe length with conflicting result type is not a good idea after all and its use in @selector causes undefined behavior.
You may want to bring it up with Cocoa folks. Warning, after all, might have had some value.
- Fariborz
>>
>> (Also, it'd be nice if the discussion was on-list.)
>>
>>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list