Fix multilevel deduction where an outer pack is used in the type of an
authorRichard Smith <richard@metafoo.co.uk>
Mon, 22 Jun 2020 23:45:12 +0000 (16:45 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Mon, 22 Jun 2020 23:47:51 +0000 (16:47 -0700)
commit009c9b83acfc8bb863894e349bccc2473c685dbc
treeb771dbfde8f03b23defbb1e5c7d12fbb7208338e
parente135cf8a03b974d2a43eb9fb93ad2d9adefcdf34
Fix multilevel deduction where an outer pack is used in the type of an
inner non-type pack at a different index.

We previously considered the index of the outer pack (which would refer
to an unrelated template parameter) to be deduced by deducing the inner
pack, because we inspected the (largely meaningless) type of an expanded
non-type template parameter pack.
clang/lib/Sema/SemaTemplateDeduction.cpp
clang/test/SemaTemplate/deduction-guide.cpp