[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

Rajveer Singh Bharadwaj via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 7 08:10:16 PDT 2024


================
@@ -10,6 +10,7 @@ void h() {
   SEL* ps = &s;
 
   @selector(dealloc) = s;  // expected-error {{expression is not assignable}}
+  // expected-note at -1 {{add '*' to dereference it}}
----------------
Rajveer100 wrote:

Actually, it isn't valid in case of `@selector`, that's why I was thinking of potential solutions. 

Like one of the tests got ignored using `!E->getType()->isObjCObjectPointerType()`, similarly clang would have for selectors as well.


https://github.com/llvm/llvm-project/pull/94159


More information about the cfe-commits mailing list