[Clang] Implement fix for DR2628
authorRoy Jacobson <roi.jacobson1@gmail.com>
Sun, 18 Sep 2022 20:07:25 +0000 (23:07 +0300)
committerRoy Jacobson <roi.jacobson1@gmail.com>
Mon, 19 Sep 2022 21:07:41 +0000 (00:07 +0300)
commit368b6832de33b366d4eb155f940e7476daace6a8
tree4927c3effd11212ca908f8da2ca932c055daf12a
parentce39bdbd65e840f1b58a642f8d361898ac99cef3
[Clang] Implement fix for DR2628

Implement suggested fix for [[ https://cplusplus.github.io/CWG/issues/2628.html | DR2628. ]] Couldn't update the DR docs because there hasn't been a DR index since it was filed, but the tests still run in CI.

Note: I only transfer the constructor constraints, not the struct constraints. I think that's OK because the struct constraints are the same
for all constructors so they don't affect the overload resolution, and if they deduce to something that doesn't pass the constraints
we catch it anyway. So (hopefully) that should be more efficient without sacrificing correctness.

Closes:
https://github.com/llvm/llvm-project/issues/57646
https://github.com/llvm/llvm-project/issues/43829

Reviewed By: erichkeane

Differential Revision: https://reviews.llvm.org/D134145
clang/docs/ReleaseNotes.rst
clang/lib/Sema/SemaTemplate.cpp
clang/test/CXX/drs/dr26xx.cpp [new file with mode: 0644]