[clang] [clang][bytecode] diagnose reads from non-constant local variables... (PR #208990)

via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 12 00:34:08 PDT 2026


github-actions[bot] wrote:

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

* 90368 tests passed
* 1721 tests skipped
* 1 test failed

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

### Clang
<details>
<summary>Clang.SemaCXX/lambda-expressions.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 -std=c++11 -Wno-unused-value -fsyntax-only -verify=expected,not-cxx03,cxx03-cxx11,cxx11,expected-cxx14 -fblocks /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp
# 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 -std=c++11 -Wno-unused-value -fsyntax-only -verify=expected,not-cxx03,cxx03-cxx11,cxx11,expected-cxx14 -fblocks /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp
# note: command had no output on stdout or stderr
# RUN: at line 2
/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 -std=c++03 -Wno-unused-value -fsyntax-only -verify=expected,cxx03,cxx03-cxx11,expected-cxx14 -fblocks /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp -Ddecltype=__decltype -Dstatic_assert=_Static_assert -Wno-c++11-extensions
# 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 -std=c++03 -Wno-unused-value -fsyntax-only -verify=expected,cxx03,cxx03-cxx11,expected-cxx14 -fblocks /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp -Ddecltype=__decltype -Dstatic_assert=_Static_assert -Wno-c++11-extensions
# note: command had no output on stdout or stderr
# RUN: at line 3
/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 -std=c++14 -Wno-unused-value -fsyntax-only -verify=expected,not-cxx03,expected-cxx14 -fblocks /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp
# 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 -std=c++14 -Wno-unused-value -fsyntax-only -verify=expected,not-cxx03,expected-cxx14 -fblocks /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp
# note: command had no output on stdout or stderr
# RUN: at line 4
/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 -std=c++17 -Wno-unused-value -verify=expected,not-cxx03 -ast-dump -fblocks /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp
# 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 -std=c++17 -Wno-unused-value -verify=expected,not-cxx03 -ast-dump -fblocks /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp
# note: command had no output on stdout or stderr
# RUN: at line 6
/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 -std=c++11 -Wno-unused-value -fsyntax-only -verify=expected,not-cxx03,cxx03-cxx11,cxx11,expected-cxx14 -fblocks /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.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 -std=c++11 -Wno-unused-value -fsyntax-only -verify=expected,not-cxx03,cxx03-cxx11,cxx11,expected-cxx14 -fblocks /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp -fexperimental-new-constant-interpreter
# .---command stderr------------
# | error: diagnostics with 'error' severity seen but not expected: 
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp Line 103: variable 'ref_j' cannot be implicitly captured in a lambda with no capture-default specified
# | error: diagnostics with 'note' severity seen but not expected: 
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp Line 102: 'ref_j' declared here
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp Line 103: lambda expression begins here
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp Line 103: capture 'ref_j' by value
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp Line 103: capture 'ref_j' by reference
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp Line 103: default capture by value
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/lambda-expressions.cpp Line 103: default capture by reference
# | 7 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/208990


More information about the cfe-commits mailing list