Author: Timm Baeder
Date: 2025-11-11T11:28:59+01:00
New Revision: c3c4a886b5a6d409433396b5e289fad322e75d4c

URL: 
https://github.com/llvm/llvm-project/commit/c3c4a886b5a6d409433396b5e289fad322e75d4c
DIFF: 
https://github.com/llvm/llvm-project/commit/c3c4a886b5a6d409433396b5e289fad322e75d4c.diff

LOG: [clang][bytecode] Add a C test case (#167484)

The original problem does not reproduce anymore, but add the test case.

Fixes https://github.com/llvm/llvm-project/issues/163563

Added: 
    

Modified: 
    clang/test/AST/ByteCode/c.c

Removed: 
    


################################################################################
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}}
+}


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to