[clang] [clang][NFC] Refactor `Sema::TemplateDeductionResult` (PR #81398)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 10 23:33:17 PST 2024
================
@@ -11445,11 +11452,16 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated,
(ParamD = Param.dyn_cast<TemplateTypeParmDecl*>()) ||
(ParamD = Param.dyn_cast<NonTypeTemplateParmDecl*>()) ||
(ParamD = Param.dyn_cast<TemplateTemplateParmDecl*>());
- switch (DeductionFailure.Result) {
- case Sema::TDK_Success:
- llvm_unreachable("TDK_success while diagnosing bad deduction");
+ switch (DeductionFailure.getResult()) {
+ case TemplateDeductionResult::Success:
+ llvm_unreachable(
+ "TemplateDeductionResult::Success while diagnosing bad deduction");
+ case TemplateDeductionResult::Invalid:
+ case TemplateDeductionResult::NonDependentConversionFailure:
+ case TemplateDeductionResult::AlreadyDiagnosed:
+ return;
----------------
Endilll wrote:
@erichkeane This is worth checking
https://github.com/llvm/llvm-project/pull/81398
More information about the cfe-commits
mailing list