Skip to content
Commit 34abc5b7 authored by Corentin Jabot's avatar Corentin Jabot
Browse files

[Clang] Fix a crash when taking the address of a consteval lambda

The `_invoke` function of lambdas was not respecting
the constexpr/consteval specifier of the call operator, so it was possible
to take its address in a non-immmediately invoked context,
even if the call operator was itself consteval.

In addition, we improve the diagnostic emmited in the lambda case
not to show that `invoke` method.

Fixes #57682

Reviewed By: aaron.ballman, #clang-language-wg

Differential Revision: https://reviews.llvm.org/D144627
parent 0eb45cd0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment