[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 1 10:57:00 PDT 2024


================
@@ -80,6 +80,81 @@ struct Response {
     return R;
   }
 };
+
+// Retrieve the primary template for a lambda call operator. It's
+// unfortunate that we only have the mappings of call operators rather
+// than lambda classes.
+const FunctionDecl *
+getPrimaryTemplateOfGenericLambda(const FunctionDecl *LambdaCallOperator) {
+  while (true) {
----------------
erichkeane wrote:

What cases do we have where this takes more than 1 step?  I also wonder if we'd be better off finding the primary `CXXRecordDecl`, then picking it up from there?  We could use `getTemplateInstantiationPattern` then `getDescribedClassTemplate` I think?

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


More information about the cfe-commits mailing list