================
@@ -1601,6 +1601,11 @@ void Sema::ActOnStartOfLambdaDefinition(LambdaIntroducer 
&Intro,
   // cleanups from the enclosing full-expression.
   PushExpressionEvaluationContextForFunction(
       ExpressionEvaluationContext::PotentiallyEvaluated, LSI->CallOperator);
+
+  // A lambda body does not inherit the immediate-function context of the
+  // enclosing lambda-expression.
+  currentEvaluationContext().InImmediateFunctionContext =
+      LSI->CallOperator->isConsteval();
----------------
cor3ntin wrote:

`PushExpressionEvaluationContextForFunction` already does that.
Did you explore whether there might be a bug in 
PushExpressionEvaluationContextForFunction ?

https://github.com/llvm/llvm-project/pull/214002
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to