aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CIR/CodeGen/statement-exprs.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CIR/CodeGen/statement-exprs.c')
-rw-r--r--clang/test/CIR/CodeGen/statement-exprs.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/clang/test/CIR/CodeGen/statement-exprs.c b/clang/test/CIR/CodeGen/statement-exprs.c
index c784ec9..2d05fc1 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;});