================ @@ -3149,9 +3156,15 @@ struct ExpandPackedTypeConstraints assert(SemaRef.ArgumentPackSubstitutionIndex != -1); + TemplateArgument Arg = TemplateArgs(T->getDepth(), T->getIndex()); + + std::optional<unsigned> PackIndex; + if (Arg.getKind() == TemplateArgument::Pack) + PackIndex = Arg.pack_size() - 1 - SemaRef.ArgumentPackSubstitutionIndex; ---------------- shafik wrote:
Agreed, it seems like a valuable refactor to me. When I see hand math like that it always raises my spidey senses and I look to see where else we are doing something like that. https://github.com/llvm/llvm-project/pull/114220 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits