[clang] ec620bf - [clang][CIR] Port test from d9c7c76
Michael Liao via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 7 11:27:22 PST 2025
Author: Michael Liao
Date: 2025-11-07T14:27:09-05:00
New Revision: ec620bf615887bd6b475a29713d0c6d073d6911e
URL: https://github.com/llvm/llvm-project/commit/ec620bf615887bd6b475a29713d0c6d073d6911e
DIFF: https://github.com/llvm/llvm-project/commit/ec620bf615887bd6b475a29713d0c6d073d6911e.diff
LOG: [clang][CIR] Port test from d9c7c76
Added:
Modified:
clang/test/CIR/CodeGen/statement-exprs.c
Removed:
################################################################################
diff --git a/clang/test/CIR/CodeGen/statement-exprs.c b/clang/test/CIR/CodeGen/statement-exprs.c
index e82df22a3d361..f917334ade829 100644
--- a/clang/test/CIR/CodeGen/statement-exprs.c
+++ b/clang/test/CIR/CodeGen/statement-exprs.c
@@ -6,7 +6,7 @@
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
int f19(void) {
- return ({ 3;;4;; });
+ return ({ 3;;4; });
}
// CIR: cir.func dso_local @f19() -> !s32i
@@ -42,6 +42,16 @@ int f19(void) {
// OGCG: %[[TMP_VAL:.+]] = load i32, ptr %[[TMP]]
// OGCG: ret i32 %[[TMP_VAL]]
+// PR166036: The trailing NullStmt should result in a void.
+void f20(void) {
+ return ({ 3;;4;; });
+}
+
+// CIR-LABEL: cir.func dso_local @f20() {{[^-]*}}
+// CIR: cir.return {{[^%]*}}
+
+// LLVM-LABEL: define{{.*}} void @f20
+// LLVM: ret void
int nested(void) {
({123;});
More information about the cfe-commits
mailing list