================ @@ -1576,7 +1576,10 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer( TrailingReturnTypeLoc, &DS), std::move(Attributes), DeclEndLoc); - Actions.ActOnLambdaClosureQualifiers(Intro, MutableLoc); + // We have called ActOnLambdaClosureQualifiers for parentheses-less cases ---------------- zyn0217 wrote:
> Yes, we need to set whether the lambda has a mutable keyword as soon as the > parameters, if present, are parsed, as that affect the meaning of subsequent > id-expressions > When there are no parens, there can be a noexcept clause for example, and > parsing that does requires knowing whether the lambda is mutable, so that we > can adjust the type of any reference-to-capture. Thanks, that makes sense! We currently set `LSI->Mutable` in `ActOnLambdaClosureQualifiers()` , and while I think it's possible to move it out of the function, I'm not opposed to leaving it as-is. https://github.com/llvm/llvm-project/pull/93206 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits