Skip to content

Commit

Permalink
[clang] Fix incorrect partial ordering context setting
Browse files Browse the repository at this point in the history
Fixes regression introduced in #94981, reported on the pull-request.

Since this fixes a commit which was never released, there are no
release notes.
  • Loading branch information
mizvekov committed Sep 16, 2024
1 parent 981bb9d commit d086374
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/Sema/SemaTemplateDeduction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3411,7 +3411,7 @@ DeduceTemplateArguments(Sema &S, T *Partial,
if (TemplateDeductionResult Result = ::DeduceTemplateArguments(
S, Partial->getTemplateParameters(),
Partial->getTemplateArgs().asArray(), TemplateArgs, Info, Deduced,
/*NumberOfArgumentsMustMatch=*/false, /*PartialOrdering=*/true,
/*NumberOfArgumentsMustMatch=*/false, /*PartialOrdering=*/false,
PackFold::ParameterToArgument,
/*HasDeducedAnyParam=*/nullptr);
Result != TemplateDeductionResult::Success)
Expand Down
10 changes: 10 additions & 0 deletions clang/test/SemaTemplate/cwg2398.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,3 +379,13 @@ namespace regression1 {
bar(input);
}
} // namespace regression1

namespace regression2 {
template <class> struct D {};

template <class ET, template <class> class VT>
struct D<VT<ET>>;

template <typename, int> struct Matrix;
template struct D<Matrix<double, 3>>;
} // namespace regression2

0 comments on commit d086374

Please sign in to comment.