[clang] [Clang] Remove the PackExpansion restrictions for rewrite substitution (PR #126206)

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 13 04:16:51 PST 2025


================
@@ -2041,9 +2041,11 @@ TemplateName TemplateInstantiator::TransformTemplateName(
         // We're rewriting the template parameter as a reference to another
         // template parameter.
         if (Arg.getKind() == TemplateArgument::Pack) {
-          assert(Arg.pack_size() == 1 && Arg.pack_begin()->isPackExpansion() &&
----------------
hokein wrote:

nit: this code is duplicated 3 times, I think we can pull out a common function for it.

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


More information about the cfe-commits mailing list