[clang] [Clang][Sema] Improve diagnostic when using imag with non complex as lvalue (PR #223510)

Oliver Hunt via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 15 00:57:03 PDT 2026


================
@@ -2,19 +2,19 @@
 
 void lvalue_with_imag_int() {
   int i;
-  __imag__ i = 0;   // expected-error {{expression is not assignable}}
+  __imag__ i = 0;   // expected-error {{__imag operator with non-complex type operand is not assignable}}
----------------
ojhunt wrote:

the operators here all appear to be `__imag__` not `__imag` is this diagnostic text correct?

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


More information about the cfe-commits mailing list