[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 10 11:32:58 PDT 2024
================
@@ -9,7 +9,15 @@ void h() {
SEL s = @selector(dealloc);
SEL* ps = &s;
+ /*
+ FIXME: https://github.com/llvm/llvm-project/pull/94159
+
+ This would assign the value of s to the SEL object pointed to by @selector(dealloc). However, in Objective-C, selectors are not pointers, they are special compile-time constructs representing method names, and they are immutable, so you cannot assign values to them.
----------------
Sirraide wrote:
Actually, one more thing: I’d format the FIXME comment here so it’s not just one long line and also include that the FIXME is about the suggestion to insert `*` specifically.
https://github.com/llvm/llvm-project/pull/94159
More information about the cfe-commits
mailing list