================ @@ -3580,16 +3580,12 @@ static Sema::TemplateDeductionResult instantiateExplicitSpecifierDeferred( if (!Expr->isValueDependent()) { return Sema::TDK_Success; } - // The `InstantiatingTemplate` here is used to restore `ActiveInstType` to - // `DeducedTemplateArgumentSubstitution` because ActiveInstType was set to - // `TemplateInstantiation` in - // `TemplateDeclInstantiator::InitFunctionInstantiation`. The real depth of - // instantiation should be the same as the depth in - // `FinishTemplateArgumentDeduction`. - // So we don't check `InstantiatingTemplate::IsValid` here. Sema::InstantiatingTemplate Inst( S, Info.getLocation(), FunctionTemplate, DeducedArgs, Sema::CodeSynthesisContext::DeducedTemplateArgumentSubstitution, Info); + if (Inst.isInvalid()) { ---------------- LYP951018 wrote:
Thanks for catching this! I’m still adapting to the LLVM coding style :( I've fixed all similar cases. https://github.com/llvm/llvm-project/pull/70548 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits