[clang] a84a6f7 - Fix this _Countof test for 32 vs 64-bits
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 17 04:37:17 PDT 2025
Author: Aaron Ballman
Date: 2025-04-17T07:36:48-04:00
New Revision: a84a6f7dd68b218757e192fe21a806c80ef0b63d
URL: https://github.com/llvm/llvm-project/commit/a84a6f7dd68b218757e192fe21a806c80ef0b63d
DIFF: https://github.com/llvm/llvm-project/commit/a84a6f7dd68b218757e192fe21a806c80ef0b63d.diff
LOG: Fix this _Countof test for 32 vs 64-bits
This should address the issues found by:
https://lab.llvm.org/buildbot/#/builders/154/builds/14958
Added:
Modified:
clang/test/C/C2y/n3369_2.c
Removed:
################################################################################
diff --git a/clang/test/C/C2y/n3369_2.c b/clang/test/C/C2y/n3369_2.c
index 3e9e14283497e..d0862c591a3a7 100644
--- a/clang/test/C/C2y/n3369_2.c
+++ b/clang/test/C/C2y/n3369_2.c
@@ -5,21 +5,21 @@
typedef typeof(sizeof(0)) size_t;
-// CHECK-LABEL: define{{( dso_local)?}} i64 @test1(
+// CHECK-LABEL: define{{( dso_local)?}} i{{64|32}} @test1(
// CHECK-SAME: ) #[[ATTR0:[0-9]+]] {
// CHECK-NEXT: [[ENTRY:.*:]]
// CHECK-NEXT: [[ARRAY:%.*]] = alloca [12 x i32], align
-// CHECK-NEXT: ret i64 12
+// CHECK-NEXT: ret i{{64|32}} 12
//
size_t test1() {
int array[12];
return _Countof(array);
}
-// CHECK-LABEL: define{{( dso_local)?}} i64 @test2(
+// CHECK-LABEL: define{{( dso_local)?}} i{{64|32}} @test2(
// CHECK-SAME: ) #[[ATTR0]] {
// CHECK-NEXT: [[ENTRY:.*:]]
-// CHECK-NEXT: ret i64 100
+// CHECK-NEXT: ret i{{64|32}} 100
//
size_t test2() {
return _Countof(float[100]);
More information about the cfe-commits
mailing list