[clang] [clang][test] cir-input-invalid.cir: Use POSIX BRE with `sed` instead of ERE (PR #235590)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 25 21:57:14 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Hubert Tong (hubert-reinterpretcast)
<details>
<summary>Changes</summary>
Versions of `sed` conforming to POSIX.1 prior to POSIX.1-2024 may operate only on basic regular expressions.
Avoids
```
sed: illegal option -- E
```
on AIX.
---
Full diff: https://github.com/llvm/llvm-project/pull/235590.diff
1 Files Affected:
- (modified) clang/test/CIR/Input/cir-input-invalid.cir (+1-1)
``````````diff
diff --git a/clang/test/CIR/Input/cir-input-invalid.cir b/clang/test/CIR/Input/cir-input-invalid.cir
index cc64546eed3580..cbf3f944e20d75 100644
--- a/clang/test/CIR/Input/cir-input-invalid.cir
+++ b/clang/test/CIR/Input/cir-input-invalid.cir
@@ -18,7 +18,7 @@
// Ops in CIR emitted by CIRGen are located in the original source, which is not
// loaded for ClangIR input; the location is kept as text in the message.
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %t/src.c -o - \
-// RUN: | sed -E 's/cir\.return %[0-9]+ : !s32i/cir.return/' > %t/src-verifier.cir
+// RUN: | sed 's/cir\.return %[0-9]\{1,\} : !s32i/cir.return/' > %t/src-verifier.cir
// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-cir %t/src-verifier.cir -o - 2>&1 \
// RUN: | FileCheck %s --check-prefix=SRC-VERIFIER --implicit-check-not=error:
// SRC-VERIFIER: error: {{.*}}src.c:2:3: 'cir.return' op returns '!cir.void' but enclosing function returns '!cir.int<s, 32>'
``````````
</details>
https://github.com/llvm/llvm-project/pull/235590
More information about the cfe-commits
mailing list