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

Pavel Samolysov via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 10 04:18:34 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<
----------------
samolisov wrote:

I believe this is very general naming for the note: `note_typecheck_expression_not_modifiable_lvalue`. Actually, we only suggest to add a star to dereference some not modifiable lvalue here (`this`, I think). What about to rename it to better reflect the suggested change? `note_typecheck_add_star_to_not_modifiable_this` or something like this. Unfortunately, I'm not familiar well with the widespread naming for notes, and am not able to make a good suggestion, sorry.

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


More information about the cfe-commits mailing list