[clang] [clang][bytecode] Fix crash in void functions returning non-void expr… (PR #176550)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 20 06:11:43 PST 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 85473 tests passed
* 1213 tests skipped
* 1 test failed

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

### Clang
<details>
<summary>Clang.AST/ByteCode/functions.cpp</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc            -pedantic -verify=expected,both /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/AST/ByteCode/functions.cpp -fexperimental-new-constant-interpreter
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -pedantic -verify=expected,both /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/AST/ByteCode/functions.cpp -fexperimental-new-constant-interpreter
# .---command stderr------------
# | error: diagnostics with 'error' severity expected but not seen: 
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/AST/ByteCode/functions.cpp Line 741 'expected-error': return type 'void' must match the return type 'int' of the expression
# | error: diagnostics with 'error' severity seen but not expected: 
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/AST/ByteCode/functions.cpp Line 741: left operand to ? is void, but right operand is of type 'int'
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/AST/ByteCode/functions.cpp Line 743: static assertion expression is not an integral constant expression
# | 3 errors generated.
# `-----------------------------
# error: command failed with exit status: 1

--

```
</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/176550


More information about the cfe-commits mailing list