[clang] [Clang] Fix crash when a local extern's previous declaration is in a discarded if `constexpr` branch (PR #233389)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 22 00:37:28 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 58424 tests passed
* 552 tests skipped
* 5 tests failed

## Failed Tests
(click on a test name to see its output)

### Clang
<details>
<summary>Clang.CIR/Bytecode/attributes.cir</summary>

```
Exit Code: 127

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\cir-opt.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\attributes.cir -verify-roundtrip | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\attributes.cir
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\cir-opt.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\attributes.cir' -verify-roundtrip
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\attributes.cir'
# note: command had no output on stdout or stderr
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\cir-opt.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\attributes.cir --emit-bytecode | llvm-strings | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\attributes.cir --check-prefix=NATIVE
# executed command: llvm-strings
# .---command stderr------------
# | 'llvm-strings': command not found
# `-----------------------------
# error: command failed with exit status: 127

--

```
</details>
<details>
<summary>Clang.CIR/Bytecode/constants.cir</summary>

```
Exit Code: 127

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\cir-opt.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\constants.cir -verify-roundtrip | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\constants.cir
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\cir-opt.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\constants.cir' -verify-roundtrip
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\constants.cir'
# note: command had no output on stdout or stderr
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\cir-opt.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\constants.cir --emit-bytecode | llvm-strings | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\constants.cir --check-prefix=NATIVE
# executed command: llvm-strings
# .---command stderr------------
# | 'llvm-strings': command not found
# `-----------------------------
# error: command failed with exit status: 127

--

```
</details>
<details>
<summary>Clang.CIR/Bytecode/global-view.cir</summary>

```
Exit Code: 127

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\cir-opt.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\global-view.cir -verify-roundtrip | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\global-view.cir
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\cir-opt.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\global-view.cir' -verify-roundtrip
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\global-view.cir'
# note: command had no output on stdout or stderr
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\cir-opt.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\global-view.cir --emit-bytecode | llvm-strings | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\global-view.cir --check-prefix=NATIVE
# executed command: llvm-strings
# .---command stderr------------
# | 'llvm-strings': command not found
# `-----------------------------
# error: command failed with exit status: 127

--

```
</details>
<details>
<summary>Clang.CIR/Bytecode/special-member.cir</summary>

```
Exit Code: 127

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\cir-opt.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\special-member.cir -verify-roundtrip | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\special-member.cir
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\cir-opt.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\special-member.cir' -verify-roundtrip
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\special-member.cir'
# note: command had no output on stdout or stderr
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\cir-opt.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\special-member.cir --emit-bytecode | llvm-strings | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\special-member.cir --check-prefix=NATIVE
# executed command: llvm-strings
# .---command stderr------------
# | 'llvm-strings': command not found
# `-----------------------------
# error: command failed with exit status: 127

--

```
</details>
<details>
<summary>Clang.CIR/Bytecode/vtable-blockaddr.cir</summary>

```
Exit Code: 127

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\cir-opt.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\vtable-blockaddr.cir -verify-roundtrip | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\vtable-blockaddr.cir
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\cir-opt.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\vtable-blockaddr.cir' -verify-roundtrip
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\vtable-blockaddr.cir'
# note: command had no output on stdout or stderr
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\cir-opt.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\vtable-blockaddr.cir --emit-bytecode | llvm-strings | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CIR\Bytecode\vtable-blockaddr.cir --check-prefix=NATIVE
# executed command: llvm-strings
# .---command stderr------------
# | 'llvm-strings': command not found
# `-----------------------------
# error: command failed with exit status: 127

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the cfe-commits mailing list