[clang] [Clang] Reconsider the timing of instantiation of local constexpr lambdas (PR #98758)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 15 23:35:08 PDT 2024


cor3ntin wrote:

> Regarding issues associated with https://github.com/llvm/llvm-project/pull/95660, I realized they are actually part of a bigger problem in constant evaluation. As discussed in https://github.com/llvm/llvm-project/issues/59966, it might be beneficial to implement on-demand template instantiation for constant evaluation. That way, we don't have to touch the logic of deferral instantiation in MarkFunctionReferenced(), (which probably can be removed then) and we could instantiate those local lambdas before evaluation.

I haven't had time to look in the issue in details, but this might be the best solution.
We will need to do that for reflection too
@Endilll is planning to wire Sema in constant evaluation in the next few months, that will be a good opportunity to fix all of these issues


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


More information about the cfe-commits mailing list