[clang] [Clang] Handle real and imaginary parts of complex lvalue in `APValue::printPretty` (PR #69252)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 18 08:34:48 PDT 2023


================
@@ -113,3 +113,8 @@ void t92(void) {
   (0 ? (_Complex double) 2.0f : 2.0f);
 }
 
+// PR69218
+int t10(void) {
+  float _Complex a;
+  return (0 < &__real__ a) && (0 < &__imag__ a);
+}
----------------
AaronBallman wrote:

I think this test should live in `clang/test/Sema/complex-imag.c` because the original crash doesn't require codegen to run to see it (it happens with `-fsyntax-only`).

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


More information about the cfe-commits mailing list