zygoloid wrote:

For what it's worth, the existing "keyword from language you're not using" 
warnings [already fire for analogous Objective-C++ 
cases](https://godbolt.org/z/3K6835PPK)... which in those cases is correct, 
since Clang does *not* accept C++11-onwards keywords as selector names in the 
corresponding versions of Objective-C++.

I wonder if it'd suffice to do a single-token lookahead / lookbehind in 
Objective-C / Objective-C++ and disable all of these warnings if the previous 
token is `@` or the next token is `:`. That would have false negatives for some 
weird cases like `class co_await : base {};` under `-Wc++20-compat` in 
Objective-C++17 or earlier, but that might be better than losing the warning 
entirely.

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