================
@@ -4692,6 +4692,17 @@ bool Sema::InstantiateDefaultArgument(SourceLocation 
CallLoc, FunctionDecl *FD,
                                       ParmVarDecl *Param) {
   assert(Param->hasUninstantiatedDefaultArg());
 
+  // FIXME: We don't track member specialization info for non-defining
+  // friend declarations, so we will not be able to later find the function
+  // pattern. As a workaround, don't instantiate the default argument in this
+  // case. This is correct per wording and only an error recovery issue, as per
----------------
a-tarasyuk wrote:

Substitution failures in the default argument are no longer diagnosed when the 
friend function declaration has no definition. Since this was already an error, 
I think it’s now just worse error recovery. Or should the checker proceed with 
instantiation and error recovery?














https://github.com/llvm/llvm-project/pull/115487
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to