================ @@ -1385,6 +1385,16 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer( Diag(RAngleLoc, diag::err_lambda_template_parameter_list_empty); } else { + // We increase the template depth before recursing into a requires-clause. + // + // This depth is used for setting up a LambdaScopeInfo (at + // Sema::RecordParsingTemplateParameterDepth), which participates in the + // invented template parameters later at InventTemplateParameter. + // + // This way, abbreviated generic lambdas could have different template + // depths, avoiding substitution into wrong template parameters during the ---------------- cor3ntin wrote:
```suggestion // depths, avoiding substitution into the wrong template parameters during the ``` https://github.com/llvm/llvm-project/pull/80656 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits