[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:54 PDT 2024


================
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s
+
----------------
Sirraide wrote:

Judging by these here, this is going in the right direction, though I would also want to see some more tests for other expressions that are not themselves modifiable lvalues, and also in other contexts that require modifiable lvalues, e.g.
```c++
reinterpret_cast<int*>(42) += 3;
```
There are some more in the description of the issue iirc, but feel also free to think of some more cases to test.

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


More information about the cfe-commits mailing list