[llvm-branch-commits] [clang] [clang] Finish implementation of P0522 (PR #96023)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jun 19 02:42:37 PDT 2024
================
@@ -3351,14 +3416,18 @@ Sema::DeduceTemplateArgumentsFromType(TemplateDecl *TD, QualType FromType,
if (Inst.isInvalid())
return TemplateDeductionResult::InstantiationDepth;
- if (Trap.hasErrorOccurred())
- return TemplateDeductionResult::SubstitutionFailure;
-
TemplateDeductionResult Result;
runWithSufficientStackSpace(Info.getLocation(), [&] {
Result = ::FinishTemplateArgumentDeduction(*this, TD, Deduced, Info);
});
- return Result;
+
+ if (Result != TemplateDeductionResult::Success)
+ return Result;
+
+ if (Trap.hasErrorOccurred())
+ return TemplateDeductionResult::SubstitutionFailure;
+
+ return TemplateDeductionResult::Success;
----------------
cor3ntin wrote:
Ditto
https://github.com/llvm/llvm-project/pull/96023
More information about the llvm-branch-commits
mailing list