[clang] [Clang] Recover GLTemplateParameterList for generic lambdas in RebuildLambdaScopeInfo (PR #118176)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 2 07:01:00 PST 2024


================
@@ -15504,10 +15504,25 @@ LambdaScopeInfo *Sema::RebuildLambdaScopeInfo(CXXMethodDecl *CallOperator) {
   LSI->CallOperator = CallOperator;
   LSI->Lambda = LambdaClass;
   LSI->ReturnType = CallOperator->getReturnType();
-  // This function in calls in situation where the context of the call operator
-  // is not entered, so we set AfterParameterList to false, so that
+  // When this function is called in situation where the context of the call
+  // operator is not entered, we set AfterParameterList to false, so that
   // `tryCaptureVariable` finds explicit captures in the appropriate context.
-  LSI->AfterParameterList = false;
+  //
+  // There is also at least a situation as in FinishTemplateArgumentDeduction(),
----------------
erichkeane wrote:

```suggestion
  // there is also at least a situation as in FinishTemplateArgumentDeduction(),
```

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


More information about the cfe-commits mailing list