[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 17 12:56:53 PDT 2024
================
@@ -0,0 +1,49 @@
+// RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s
+
+struct S {
+ void f() {
+ ++this; // expected-error {{expression is not assignable}}
+ // expected-note at -1 {{add '*' to dereference it}}
----------------
Sirraide wrote:
That’s true. Looking at this again, I’m candidly a bit confused that this seemed fine to me at the time...
https://github.com/llvm/llvm-project/pull/94159
More information about the cfe-commits
mailing list