From 0c5308801cd7be64c4f6d28c73adc7d9ae001e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 11 Nov 2025 11:01:50 +0100 Subject: [PATCH] [clang][bytecode] Add a C test case The original problem does not reproduce anymore, but add the test case. Fixes https://github.com/llvm/llvm-project/issues/163563 --- clang/test/AST/ByteCode/c.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clang/test/AST/ByteCode/c.c b/clang/test/AST/ByteCode/c.c index 3360d4f725b24..bffd557ff77a6 100644 --- a/clang/test/AST/ByteCode/c.c +++ b/clang/test/AST/ByteCode/c.c @@ -387,3 +387,8 @@ void bar2(void) { int a[2][3][4][5]; // all-note {{array 'a' declared here}} foo2(&a[0][4]); // all-warning {{array index 4 is past the end of the array}} } + +void plainComplex(void) { + _Complex cd; // all-warning {{_Complex double}} + cd = *(_Complex *)&(struct { double r, i; }){0.0, 0.0}; // all-warning {{_Complex double}} +}