================ @@ -507,10 +507,62 @@ static TemplateDeductionResult DeduceNonTypeTemplateArgument( S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced); } +static NamedDecl *DeduceTemplateArguments(Sema &S, NamedDecl *A, + TemplateArgument Default) { + switch (A->getKind()) { + case Decl::TemplateTypeParm: { + auto *T = cast<TemplateTypeParmDecl>(A); + // FIXME: DefaultArgument can't represent a pack. + if (T->isParameterPack()) ---------------- mizvekov wrote:
It's possible to write code that hits this condition, in fact such code is already in the clang test suite. Currently the Decls for Type and Expr parameters don't store a whole TemplateArgument for the default argument, in order to save a few bytes, they store only a TSI and Expr* respectively, which doesn't cover the Pack case. https://github.com/llvm/llvm-project/pull/89807 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits