[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 13 04:47:54 PDT 2025


================
@@ -75,7 +75,7 @@ getDepthAndIndex(UnexpandedParameterPack UPP) {
   if (const auto *TTP = dyn_cast<const TemplateTypeParmType *>(UPP.first))
     return std::make_pair(TTP->getDepth(), TTP->getIndex());
 
----------------
zyn0217 wrote:

I think the users of this function shouldn't expect a `SubstTemplateTypeParmPackType/SubstNonTypeTemplateParmPackExpr` anyway. (See the explanation below) I'll add some asserts.

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


More information about the cfe-commits mailing list