================
@@ -16561,10 +16583,18 @@ ExprResult Sema::BuildCallToMemberFunction(Scope *S, 
Expr *MemExprE,
                                       NewArgs))
       return ExprError();
 
+    // FIXME: avoid copy.
+    TemplateArgumentListInfo TemplateArgsBuffer, *TemplateArgs = nullptr;
+    if (MemExpr->hasExplicitTemplateArgs()) {
+      MemExpr->copyTemplateArgumentsInto(TemplateArgsBuffer);
+      TemplateArgs = &TemplateArgsBuffer;
+    }
+
----------------
zwuis wrote:

I have to. `DeclRefExpr::Create` takes a `const TemplateArgumentListInfo *`, 
not a `const ASTTemplateKWAndArgsInfo *`.

There are already identical FIXMEs in this file because of similar problems. I 
can fix them in a separate PR.

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

Reply via email to