[clang] [Clang][Sema] Fix lambdas mistakenly inheriting InImmediateFunctionContext (PR #232458)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 15 15:51:36 PDT 2026


github-actions[bot] wrote:

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

* 62049 tests passed
* 2126 tests skipped
* 2 tests failed

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

### Clang
<details>
<summary>Clang.SemaCXX/cxx2a-consteval.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/24/include -nostdsysteminc -std=c++2a -emit-llvm-only -Wno-unused-value -Wno-vla /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/cxx2a-consteval.cpp -verify
# 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/24/include -nostdsysteminc -std=c++2a -emit-llvm-only -Wno-unused-value -Wno-vla /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/cxx2a-consteval.cpp -verify
# .---command stderr------------
# | error: 'expected-error' diagnostics seen but not expected: 
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/cxx2a-consteval.cpp Line 1070: cannot take address of consteval call operator of '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/cxx2a-consteval.cpp:1070:23)' outside of an immediate invocation
# | error: 'expected-note' diagnostics seen but not expected: 
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/cxx2a-consteval.cpp Line 1070: declared here
# | 2 errors generated.
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>Clang.SemaCXX/cxx2b-consteval-propagate.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/24/include -nostdsysteminc -std=c++2a -Wno-unused-value /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/cxx2b-consteval-propagate.cpp -verify
# 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/24/include -nostdsysteminc -std=c++2a -Wno-unused-value /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/cxx2b-consteval-propagate.cpp -verify
# .---command stderr------------
# | error: 'expected-error' diagnostics seen but not expected: 
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/cxx2b-consteval-propagate.cpp Line 386: cannot take address of consteval call operator of '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/cxx2b-consteval-propagate.cpp:386:6)' outside of an immediate invocation
# | error: 'expected-note' diagnostics seen but not expected: 
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/cxx2b-consteval-propagate.cpp Line 386: declared here
# | 2 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/232458


More information about the cfe-commits mailing list