[clang] [clang][Sema] Handle function parameter packs in `PackDeductionScope::addPacks` (PR #215235)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 19:13:52 PDT 2026


================
@@ -935,7 +950,7 @@ class PackDeductionScope {
       S.collectUnexpandedParameterPacks(Pattern, Unexpanded);
       for (unsigned I = 0, N = Unexpanded.size(); I != N; ++I) {
         unsigned Depth, Index;
-        if (auto DI = getDepthAndIndex(Unexpanded[I]))
+        if (auto DI = GetDepthAndIndex(Unexpanded[I]))
           std::tie(Depth, Index) = *DI;
----------------
zyn0217 wrote:

I would prefer
```cpp
// We could never deduce packs from an unexpanded parameter
if (isa<ParmVarDecl>(Unexpanded[I].first))
  continue;
```

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


More information about the cfe-commits mailing list