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

via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 2 21:07:55 PDT 2024


================
@@ -8777,6 +8777,9 @@ def err_typecheck_incomplete_type_not_modifiable_lvalue : Error<
 def err_typecheck_lvalue_casts_not_supported : Error<
   "assignment to cast is illegal, lvalue casts are not supported">;
 
+def note_typecheck_expression_not_modifiable_lvalue : Note<
+  "dereference the pointer to modify">; 
----------------
Sirraide wrote:

```suggestion
  "add '*' to dereference it">; 
```
There is a chance that this isn’t a pointer, so something like this might work a bit better, though it is admittedly also a bit more vague...

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


More information about the cfe-commits mailing list