[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 23 23:12:06 PDT 2024


================
@@ -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())
----------------
cor3ntin wrote:

Should we assert here?

https://github.com/llvm/llvm-project/pull/89807


More information about the cfe-commits mailing list