Author: Vlad Serebrennikov Date: 2025-01-06T18:32:44+03:00 New Revision: 1229b78f1676d56d0d386a5c4cde8f98a78d0989
URL: https://github.com/llvm/llvm-project/commit/1229b78f1676d56d0d386a5c4cde8f98a78d0989 DIFF: https://github.com/llvm/llvm-project/commit/1229b78f1676d56d0d386a5c4cde8f98a78d0989.diff LOG: [clang][NFC] Clean up CWG2396 test Added: Modified: clang/test/CXX/drs/cwg23xx.cpp clang/www/cxx_dr_status.html Removed: ################################################################################ diff --git a/clang/test/CXX/drs/cwg23xx.cpp b/clang/test/CXX/drs/cwg23xx.cpp index 48db83107d76a1..d0ec48e3f86cd6 100644 --- a/clang/test/CXX/drs/cwg23xx.cpp +++ b/clang/test/CXX/drs/cwg23xx.cpp @@ -365,6 +365,35 @@ struct A { #endif } // namespace cwg2363 +namespace cwg2369 { // cwg2369: partial +#if __cplusplus >= 202002L +template <class T> struct Z { + typedef typename T::x xx; +}; + +template <class T> +concept C = requires { typename T::A; }; +template <C T> typename Z<T>::xx f(void *, T); // #1 +template <class T> void f(int, T); // #2 + +struct A { +} a; + +struct ZZ { + template <class T, class = typename Z<T>::xx> operator T *(); + operator int(); +}; + +void foo() { + ZZ zz; + f(1, a); // OK, deduction fails for #1 because there is no conversion from int + // to void* + f(zz, 42); // OK, deduction fails for #1 because C<int> is not satisfied +} + +#endif +} // namespace cwg2369 + namespace cwg2370 { // cwg2370: no namespace N { typedef int type; @@ -495,32 +524,3 @@ namespace cwg2397 { // cwg2397: 17 } #endif } // namespace cwg2397 - -namespace cwg2369 { // cwg2369: partial -#if __cplusplus >= 202002L -template <class T> struct Z { - typedef typename T::x xx; -}; - -template <class T> -concept C = requires { typename T::A; }; -template <C T> typename Z<T>::xx f(void *, T); // #1 -template <class T> void f(int, T); // #2 - -struct A { -} a; - -struct ZZ { - template <class T, class = typename Z<T>::xx> operator T *(); - operator int(); -}; - -void foo() { - ZZ zz; - f(1, a); // OK, deduction fails for #1 because there is no conversion from int - // to void* - f(zz, 42); // OK, deduction fails for #1 because C<int> is not satisfied -} - -#endif -} // namespace cwg2369 diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html index a7f41d6a686869..80a654aa691fa2 100755 --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -16464,7 +16464,11 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td><a href="https://cplusplus.github.io/CWG/issues/2770.html">2770</a></td> <td>open</td> <td>Trailing <I>requires-clause</I> can refer to function parameters before they are substituted into</td> - <td align="center">Clang 20</td> + <td align="center"> + <details> + <summary>Not resolved</summary> + Clang 20 implements 2023-07-14 resolution + </details></td> </tr> <tr id="2771"> <td><a href="https://cplusplus.github.io/CWG/issues/2771.html">2771</a></td> _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits