Skip to content

Commit ec620bf

Browse files
committed
[clang][CIR] Port test from d9c7c76
1 parent 5fc1b74 commit ec620bf

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

clang/test/CIR/CodeGen/statement-exprs.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
77

88
int f19(void) {
9-
return ({ 3;;4;; });
9+
return ({ 3;;4; });
1010
}
1111

1212
// CIR: cir.func dso_local @f19() -> !s32i
@@ -42,6 +42,16 @@ int f19(void) {
4242
// OGCG: %[[TMP_VAL:.+]] = load i32, ptr %[[TMP]]
4343
// OGCG: ret i32 %[[TMP_VAL]]
4444

45+
// PR166036: The trailing NullStmt should result in a void.
46+
void f20(void) {
47+
return ({ 3;;4;; });
48+
}
49+
50+
// CIR-LABEL: cir.func dso_local @f20() {{[^-]*}}
51+
// CIR: cir.return {{[^%]*}}
52+
53+
// LLVM-LABEL: define{{.*}} void @f20
54+
// LLVM: ret void
4555

4656
int nested(void) {
4757
({123;});

0 commit comments

Comments
 (0)