================
@@ -3572,10 +3572,17 @@ TemplateDeductionResult 
Sema::SubstituteExplicitTemplateArguments(
                                 SugaredBuilder, CanonicalBuilder,
                                 /*UpdateArgsWithConversions=*/false) ||
       Trap.hasErrorOccurred()) {
+
     unsigned Index = SugaredBuilder.size();
     if (Index >= TemplateParams->size())
       return TemplateDeductionResult::SubstitutionFailure;
     Info.Param = makeTemplateParameter(TemplateParams->getParam(Index));
+    Info.FirstArg = ExplicitTemplateArgs[Index].getArgument();
+    if (ExplicitTemplateArgs[Index].getArgument().getKind() ==
+        TemplateArgument::Expression)
+      Info.SecondArg =
+          ExplicitTemplateArgs[Index].getSourceExpression()->getType();
----------------
AidanGoldfarb wrote:

By this do you mean in:
`DeductionFailureInfo clang::MakeDeductionFailureInfo(...)`
`void DeductionFailureInfo::Destroy()`
...
`const TemplateArgument *DeductionFailureInfo::getSecondArg()`

I tried to follow the pattern of `TemplateDeductionResult::Inconsistent`, as 
that uses similar parameters. 

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

Reply via email to