AaronBallman wrote:

> The ObjC `@` is essentially an escape into a completely different grammar, 
> and it doesn't matter whether the following identifier is a keyword or not in 
> the base language. This warning should never kick in on that identifier.

Okay, I've done that.

> Similarly, ObjC selector components exist outside of the normal keyword 
> rules, and the warning should never kick in on them.

I don't know about selectors all that much; can you give me a test case that 
you think I should handle?

> Otherwise, this warning would be very useful in baseline Objective-C as a way 
> of discovering names that would be keywords in Objective-C++, mostly in the 
> incorporated C subset but also for ObjC features that ultimately end up in 
> the C namespace and therefore are subject to the normal keyword rules, like 
> method parameters and class names.

Okay, it remains enabled in Objective-C, just silenced if the preceding token 
is `@`.

https://github.com/llvm/llvm-project/pull/137234
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to