When performing template argument deduction to select a partial
authorRichard Smith <richard@metafoo.co.uk>
Wed, 5 May 2021 21:44:49 +0000 (14:44 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Wed, 5 May 2021 21:47:18 +0000 (14:47 -0700)
commit6bbfa0fd408e81055c360c2e059554dd76fd7f09
tree36e65b3ca588dcf7ee4556cd00f8e2ff1945f40d
parent909a5ccf3be7868b24320aaaf0e588b56ba6e3f3
When performing template argument deduction to select a partial
specialization while substituting a partial template parameter pack,
don't try to extend the existing deduction.

This caused us to select the wrong partial specialization in some rare
cases. A recent change to libc++ caused this to happen in practice for
code using std::conjunction.
clang/lib/Sema/SemaTemplateDeduction.cpp
clang/test/SemaTemplate/partial-spec-instantiate.cpp