[clang] [CIR] Fix failing lit test (statement-exprs.c) (PR #167000)

via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 7 11:33:14 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Andy Kaylor (andykaylor)

<details>
<summary>Changes</summary>

This fixes a test case in the clang/CIR/CodeGen/statement-exprs.c test. The test case was copied from a similar test in clang/CodeGen/exprs.c and was recently broken by https://github.com/llvm/llvm-project/pull/166036 which corrects Clang's behavior with trailing NullStmts. This change updates the CIR test in the same way that the classic codegen test was updated, removing the trailing null part of the expression.

---
Full diff: https://github.com/llvm/llvm-project/pull/167000.diff


1 Files Affected:

- (modified) clang/test/CIR/CodeGen/statement-exprs.c (+1-1) 


``````````diff
diff --git a/clang/test/CIR/CodeGen/statement-exprs.c b/clang/test/CIR/CodeGen/statement-exprs.c
index c784ec9eda7d8..5925515997270 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

``````````

</details>


https://github.com/llvm/llvm-project/pull/167000


More information about the cfe-commits mailing list