https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/97200
>From 0dea95701ca4dfca9b7d0bd889003fc35aa3017e Mon Sep 17 00:00:00 2001 From: Mital Ashok <mi...@mitalashok.co.uk> Date: Sun, 30 Jun 2024 10:39:15 +0100 Subject: [PATCH 01/10] [NFC] [Clang] Some core issues have changed status from tentatively ready -> ready / review --- clang/test/CXX/drs/cwg25xx.cpp | 2 +- clang/test/CXX/drs/cwg28xx.cpp | 16 ++-- clang/www/cxx_dr_status.html | 130 +++++++++++++++++++++++---------- clang/www/make_cxx_dr_status | 6 +- 4 files changed, 104 insertions(+), 50 deletions(-) diff --git a/clang/test/CXX/drs/cwg25xx.cpp b/clang/test/CXX/drs/cwg25xx.cpp index 0934f0cc19c6a..5f8a058f8157a 100644 --- a/clang/test/CXX/drs/cwg25xx.cpp +++ b/clang/test/CXX/drs/cwg25xx.cpp @@ -139,7 +139,7 @@ struct D3 : B { #endif #if __cplusplus >= 202302L -namespace cwg2561 { // cwg2561: no tentatively ready 2024-03-18 +namespace cwg2561 { // cwg2561: no ready 2024-03-18 struct C { constexpr C(auto) { } }; diff --git a/clang/test/CXX/drs/cwg28xx.cpp b/clang/test/CXX/drs/cwg28xx.cpp index c77bd433d8e21..524e67b52de51 100644 --- a/clang/test/CXX/drs/cwg28xx.cpp +++ b/clang/test/CXX/drs/cwg28xx.cpp @@ -30,7 +30,7 @@ using U2 = decltype(&main); #endif } // namespace cwg2811 -namespace cwg2819 { // cwg2819: 19 tentatively ready 2023-12-01 +namespace cwg2819 { // cwg2819: 19 ready 2023-12-01 #if __cpp_constexpr >= 202306L constexpr void* p = nullptr; constexpr int* q = static_cast<int*>(p); @@ -111,7 +111,7 @@ struct D : N::B { #endif } // namespace cwg2857 -namespace cwg2858 { // cwg2858: 19 tentatively ready 2024-04-05 +namespace cwg2858 { // cwg2858: 19 ready 2024-04-05 #if __cplusplus > 202302L @@ -134,7 +134,7 @@ struct A { } // namespace cwg2858 -namespace cwg2877 { // cwg2877: 19 tentatively ready 2024-05-31 +namespace cwg2877 { // cwg2877: 19 ready 2024-05-31 #if __cplusplus >= 202002L enum E { x }; void f() { @@ -150,7 +150,7 @@ void g() { #endif } // namespace cwg2877 -namespace cwg2881 { // cwg2881: 19 tentatively ready 2024-04-19 +namespace cwg2881 { // cwg2881: 19 ready 2024-04-19 #if __cplusplus >= 202302L @@ -220,7 +220,7 @@ void f() { } // namespace cwg2881 -namespace cwg2882 { // cwg2882: 2.7 tentatively ready 2024-05-31 +namespace cwg2882 { // cwg2882: 2.7 ready 2024-05-31 struct C { operator void() = delete; // expected-warning@-1 {{conversion function converting 'cwg2882::C' to 'void' will never be used}} @@ -232,7 +232,7 @@ void f(C c) { } } // namespace cwg2882 -namespace cwg2883 { // cwg2883: no tentatively ready 2024-05-31 +namespace cwg2883 { // cwg2883: no ready 2024-05-31 #if __cplusplus >= 201103L void f() { int x; @@ -257,7 +257,7 @@ void g() { #endif } // namespace cwg2883 -namespace cwg2885 { // cwg2885: 16 tentatively ready 2024-05-31 +namespace cwg2885 { // cwg2885: 16 review 2024-05-31 #if __cplusplus >= 202002L template <class T> struct A { @@ -271,7 +271,7 @@ static_assert(!__is_trivially_constructible(B)); #endif } // namespace cwg2885 -namespace cwg2886 { // cwg2886: 9 tentatively ready 2024-05-31 +namespace cwg2886 { // cwg2886: 9 ready 2024-05-31 #if __cplusplus >= 201103L struct C { C() = default; diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html index 937f67981e296..64b361976a5a5 100755 --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -1442,7 +1442,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="233"> <td><a href="https://cplusplus.github.io/CWG/issues/233.html">233</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>References vs pointers in UDC overload resolution</td> <td align="center">Not resolved</td> </tr> @@ -7329,11 +7329,11 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td>Overloading member function templates based on dependent return type</td> <td class="unknown" align="center">Unknown</td> </tr> - <tr class="open" id="1253"> + <tr id="1253"> <td><a href="https://cplusplus.github.io/CWG/issues/1253.html">1253</a></td> - <td>open</td> + <td>C++17</td> <td>Generic non-template members</td> - <td align="center">Not resolved</td> + <td class="unknown" align="center">Unknown</td> </tr> <tr id="1254"> <td><a href="https://cplusplus.github.io/CWG/issues/1254.html">1254</a></td> @@ -12677,7 +12677,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2144"> <td><a href="https://cplusplus.github.io/CWG/issues/2144.html">2144</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Function/variable declaration ambiguity</td> <td align="center">Not resolved</td> </tr> @@ -15179,7 +15179,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2561"> <td><a href="https://cplusplus.github.io/CWG/issues/2561.html">2561</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Conversion to function pointer for lambda with explicit object parameter</td> <td title="Clang does not implement 2024-03-18 resolution" align="center">Not Resolved*</td> </tr> @@ -15341,7 +15341,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2588"> <td><a href="https://cplusplus.github.io/CWG/issues/2588.html">2588</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>friend declarations and module linkage</td> <td align="center">Not resolved</td> </tr> @@ -15541,7 +15541,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td><a href="https://cplusplus.github.io/CWG/issues/2621.html">2621</a></td> <td>C++23</td> <td>Kind of lookup for <TT>using enum</TT> declarations</td> - <td title="Clang 19 implements 2024-05-31 resolution" align="center">Superseded by <a href="#2877">2877</a></td> + <td class="-superseded" align="center">Superseded by <a href="#2877">2877</a></td> </tr> <tr id="2622"> <td><a href="https://cplusplus.github.io/CWG/issues/2622.html">2622</a></td> @@ -16181,7 +16181,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2728"> <td><a href="https://cplusplus.github.io/CWG/issues/2728.html">2728</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Evaluation of conversions in a <I>delete-expression</I></td> <td align="center">Not resolved</td> </tr> @@ -16698,13 +16698,13 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2814"> <td><a href="https://cplusplus.github.io/CWG/issues/2814.html">2814</a></td> - <td>tentatively ready</td> + <td>review</td> <td>Alignment requirement of incomplete class type</td> <td align="center">Not resolved</td> </tr> <tr class="open" id="2815"> <td><a href="https://cplusplus.github.io/CWG/issues/2815.html">2815</a></td> - <td>open</td> + <td>drafting</td> <td>Overload resolution for references/pointers to <TT>noexcept</TT> functions</td> <td align="center">Not resolved</td> </tr> @@ -16722,13 +16722,13 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2818"> <td><a href="https://cplusplus.github.io/CWG/issues/2818.html">2818</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Use of predefined reserved identifiers</td> <td align="center">Not resolved</td> </tr> <tr class="open" id="2819"> <td><a href="https://cplusplus.github.io/CWG/issues/2819.html">2819</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Cast from null pointer value in a constant expression</td> <td title="Clang 19 implements 2023-12-01 resolution" align="center">Not Resolved*</td> </tr> @@ -16830,7 +16830,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2836"> <td><a href="https://cplusplus.github.io/CWG/issues/2836.html">2836</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Conversion rank of <TT>long double</TT> and extended floating-point types</td> <td align="center">Not resolved</td> </tr> @@ -16962,13 +16962,13 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2858"> <td><a href="https://cplusplus.github.io/CWG/issues/2858.html">2858</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Declarative <I>nested-name-specifier</I>s and <I>pack-index-specifier</I>s</td> <td title="Clang 19 implements 2024-04-05 resolution" align="center">Not Resolved*</td> </tr> <tr class="open" id="2859"> <td><a href="https://cplusplus.github.io/CWG/issues/2859.html">2859</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Value-initialization with multiple default constructors</td> <td align="center">Not resolved</td> </tr> @@ -16980,13 +16980,13 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2861"> <td><a href="https://cplusplus.github.io/CWG/issues/2861.html">2861</a></td> - <td>tentatively ready</td> + <td>ready</td> <td><TT>dynamic_cast</TT> on bad pointer value</td> <td align="center">Not resolved</td> </tr> <tr class="open" id="2862"> <td><a href="https://cplusplus.github.io/CWG/issues/2862.html">2862</a></td> - <td>tentatively ready</td> + <td>drafting</td> <td>Unclear boundaries of template declarations</td> <td align="center">Not resolved</td> </tr> @@ -16998,13 +16998,13 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2864"> <td><a href="https://cplusplus.github.io/CWG/issues/2864.html">2864</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Narrowing floating-point conversions</td> <td align="center">Not resolved</td> </tr> <tr class="open" id="2865"> <td><a href="https://cplusplus.github.io/CWG/issues/2865.html">2865</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Regression on result of conditional operator</td> <td align="center">Not resolved</td> </tr> @@ -17016,7 +17016,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2867"> <td><a href="https://cplusplus.github.io/CWG/issues/2867.html">2867</a></td> - <td>review</td> + <td>ready</td> <td>Order of initialization for structured bindings</td> <td align="center">Not resolved</td> </tr> @@ -17028,25 +17028,25 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2869"> <td><a href="https://cplusplus.github.io/CWG/issues/2869.html">2869</a></td> - <td>tentatively ready</td> + <td>ready</td> <td><TT>this</TT> in local classes</td> <td align="center">Not resolved</td> </tr> <tr class="open" id="2870"> <td><a href="https://cplusplus.github.io/CWG/issues/2870.html">2870</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Combining absent <I>encoding-prefix</I>es</td> <td align="center">Not resolved</td> </tr> <tr class="open" id="2871"> <td><a href="https://cplusplus.github.io/CWG/issues/2871.html">2871</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>User-declared constructor templates inhibiting default constructors</td> <td align="center">Not resolved</td> </tr> <tr class="open" id="2872"> <td><a href="https://cplusplus.github.io/CWG/issues/2872.html">2872</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Linkage and unclear "can be referred to"</td> <td align="center">Not resolved</td> </tr> @@ -17058,25 +17058,25 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2874"> <td><a href="https://cplusplus.github.io/CWG/issues/2874.html">2874</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Qualified declarations of partial specializations</td> <td align="center">Not resolved</td> </tr> <tr class="open" id="2875"> <td><a href="https://cplusplus.github.io/CWG/issues/2875.html">2875</a></td> - <td>tentatively ready</td> + <td>review</td> <td>Missing support for round-tripping null pointer values through indirection/address operators</td> <td align="center">Not resolved</td> </tr> <tr class="open" id="2876"> <td><a href="https://cplusplus.github.io/CWG/issues/2876.html">2876</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Disambiguation of <TT>T x = delete("text")</TT></td> <td align="center">Not resolved</td> </tr> <tr class="open" id="2877"> <td><a href="https://cplusplus.github.io/CWG/issues/2877.html">2877</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Type-only lookup for <I>using-enum-declarator</I></td> <td title="Clang 19 implements 2024-05-31 resolution" align="center">Not Resolved*</td> </tr> @@ -17100,19 +17100,19 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2881"> <td><a href="https://cplusplus.github.io/CWG/issues/2881.html">2881</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Type restrictions for the explicit object parameter of a lambda</td> <td title="Clang 19 implements 2024-04-19 resolution" align="center">Not Resolved*</td> </tr> <tr class="open" id="2882"> <td><a href="https://cplusplus.github.io/CWG/issues/2882.html">2882</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Unclear treatment of conversion to <TT>void</TT></td> <td title="Clang 2.7 implements 2024-05-31 resolution" align="center">Not Resolved*</td> </tr> <tr class="open" id="2883"> <td><a href="https://cplusplus.github.io/CWG/issues/2883.html">2883</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Definition of "odr-usable" ignores lambda scopes</td> <td title="Clang does not implement 2024-05-31 resolution" align="center">Not Resolved*</td> </tr> @@ -17124,19 +17124,19 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2885"> <td><a href="https://cplusplus.github.io/CWG/issues/2885.html">2885</a></td> - <td>tentatively ready</td> + <td>review</td> <td>Non-eligible trivial default constructors</td> <td title="Clang 16 implements 2024-05-31 resolution" align="center">Not Resolved*</td> </tr> <tr class="open" id="2886"> <td><a href="https://cplusplus.github.io/CWG/issues/2886.html">2886</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Temporaries and trivial potentially-throwing special member functions</td> <td title="Clang 9 implements 2024-05-31 resolution" align="center">Not Resolved*</td> </tr> <tr class="open" id="2887"> <td><a href="https://cplusplus.github.io/CWG/issues/2887.html">2887</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Missing compatibility entries for xvalues</td> <td align="center">Not resolved</td> </tr> @@ -17160,13 +17160,13 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2891"> <td><a href="https://cplusplus.github.io/CWG/issues/2891.html">2891</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Normative status of implementation limits</td> <td align="center">Not resolved</td> </tr> <tr class="open" id="2892"> <td><a href="https://cplusplus.github.io/CWG/issues/2892.html">2892</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Unclear usual arithmetic conversions</td> <td align="center">Not resolved</td> </tr> @@ -17184,7 +17184,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2895"> <td><a href="https://cplusplus.github.io/CWG/issues/2895.html">2895</a></td> - <td>tentatively ready</td> + <td>ready</td> <td>Initialization should ignore the destination type's cv-qualification</td> <td align="center">Not resolved</td> </tr> @@ -17235,6 +17235,60 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td>tentatively ready</td> <td>Can we omit the <TT>template</TT> disambiguator in <I>nested-name-specifier</I>s in type-only contexts?</td> <td align="center">Not resolved</td> + </tr> + <tr class="open" id="2904"> + <td><a href="https://cplusplus.github.io/CWG/issues/2904.html">2904</a></td> + <td>open</td> + <td>Introducing <I>template-name</I>s</td> + <td align="center">Not resolved</td> + </tr> + <tr class="open" id="2905"> + <td><a href="https://cplusplus.github.io/CWG/issues/2905.html">2905</a></td> + <td>tentatively ready</td> + <td>Value-dependence of <I>noexcept-expression</I></td> + <td align="center">Not resolved</td> + </tr> + <tr class="open" id="2906"> + <td><a href="https://cplusplus.github.io/CWG/issues/2906.html">2906</a></td> + <td>tentatively ready</td> + <td>Lvalue-to-rvalue conversion of class types for conditional operator</td> + <td align="center">Not resolved</td> + </tr> + <tr class="open" id="2907"> + <td><a href="https://cplusplus.github.io/CWG/issues/2907.html">2907</a></td> + <td>open</td> + <td>Constant lvalue-to-rvalue conversion on uninitialized <TT>std::nullptr_t</TT></td> + <td align="center">Not resolved</td> + </tr> + <tr class="open" id="2908"> + <td><a href="https://cplusplus.github.io/CWG/issues/2908.html">2908</a></td> + <td>open</td> + <td>Counting physical source lines for <TT>__LINE__</TT></td> + <td align="center">Not resolved</td> + </tr> + <tr class="open" id="2909"> + <td><a href="https://cplusplus.github.io/CWG/issues/2909.html">2909</a></td> + <td>open</td> + <td>Subtle difference between constant-initialized and constexpr</td> + <td align="center">Not resolved</td> + </tr> + <tr class="open" id="2910"> + <td><a href="https://cplusplus.github.io/CWG/issues/2910.html">2910</a></td> + <td>open</td> + <td>Effect of <I>requirement-parameter-list</I>s on odr-usability</td> + <td align="center">Not resolved</td> + </tr> + <tr class="open" id="2911"> + <td><a href="https://cplusplus.github.io/CWG/issues/2911.html">2911</a></td> + <td>open</td> + <td>Unclear meaning of expressions "appearing within" subexpressions</td> + <td align="center">Not resolved</td> + </tr> + <tr class="open" id="2912"> + <td><a href="https://cplusplus.github.io/CWG/issues/2912.html">2912</a></td> + <td>open</td> + <td>Too-large value for size in array new</td> + <td align="center">Not resolved</td> </tr></table> </div> diff --git a/clang/www/make_cxx_dr_status b/clang/www/make_cxx_dr_status index 1d337fc4e5f87..fe267a6ddbfb2 100755 --- a/clang/www/make_cxx_dr_status +++ b/clang/www/make_cxx_dr_status @@ -145,10 +145,10 @@ def availability(issue): unresolved_status = '' proposed_resolution = '' - unresolved_status_match = re.search(r' (open|drafting|review|tentatively ready)', status) + unresolved_status_match = re.search(r' (open|drafting|review|tentatively ready|ready)', status) if unresolved_status_match: unresolved_status = unresolved_status_match.group(1) - proposed_resolution_match = re.search(r' (open|drafting|review|tentatively ready) (\d{4}-\d{2}(?:-\d{2})?|P\d{4}R\d+)$', status) + proposed_resolution_match = re.search(r' (open|drafting|review|tentatively ready|ready) (\d{4}-\d{2}(?:-\d{2})?|P\d{4}R\d+)$', status) if proposed_resolution_match is None: raise AvailabilityError('Issue {}: \'{}\' status should be followed by a paper number (P1234R5) or proposed resolution in YYYY-MM-DD format'.format(dr.issue, unresolved_status)) proposed_resolution = proposed_resolution_match.group(2) @@ -246,7 +246,7 @@ for dr in drs: avail = 'Extension' avail_style = '' - elif dr.status in ('open', 'drafting', 'review', 'tentatively ready'): + elif dr.status in ('open', 'drafting', 'review', 'tentatively ready', 'ready'): row_style = ' class="open"' try: avail, avail_style, unresolved_status, tooltip = availability(dr.issue) >From 842784c7ff4122a876de9a684415e23dc9ddcbfd Mon Sep 17 00:00:00 2001 From: Mital Ashok <mi...@mitalashok.co.uk> Date: Sun, 30 Jun 2024 13:34:30 +0100 Subject: [PATCH 02/10] CWG2561: Update date No wording changed when the status changed from tentatively ready -> ready https://github.com/cplusplus/CWG/commit/88301b7cd100740f5aa131c405753928a071f41e#diff-7f6b9e6fa45271f479d29c851c4a8b0904f563aadff7a477b53f977113816fa1 --- clang/test/CXX/drs/cwg25xx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/test/CXX/drs/cwg25xx.cpp b/clang/test/CXX/drs/cwg25xx.cpp index 5f8a058f8157a..6280f9c0ad36f 100644 --- a/clang/test/CXX/drs/cwg25xx.cpp +++ b/clang/test/CXX/drs/cwg25xx.cpp @@ -139,7 +139,7 @@ struct D3 : B { #endif #if __cplusplus >= 202302L -namespace cwg2561 { // cwg2561: no ready 2024-03-18 +namespace cwg2561 { // cwg2561: no ready 2024-06-25 struct C { constexpr C(auto) { } }; >From 7ab27a04ce8ff109e732de943ec6d28064e81882 Mon Sep 17 00:00:00 2001 From: Mital Ashok <mi...@mitalashok.co.uk> Date: Sun, 30 Jun 2024 13:37:10 +0100 Subject: [PATCH 03/10] CWG2819: Update date No wording changed when the status changed from tentatively ready -> ready https://github.com/cplusplus/CWG/commit/7d046fa9a210d8a957602dfb37405b8e083e3c66#diff-e987bc686b50066d0b5e3a9550c2d159f8e2468f1b0c678886ae0b477020740f --- clang/test/CXX/drs/cwg28xx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/test/CXX/drs/cwg28xx.cpp b/clang/test/CXX/drs/cwg28xx.cpp index 524e67b52de51..bd6f48eb6c3d0 100644 --- a/clang/test/CXX/drs/cwg28xx.cpp +++ b/clang/test/CXX/drs/cwg28xx.cpp @@ -30,7 +30,7 @@ using U2 = decltype(&main); #endif } // namespace cwg2811 -namespace cwg2819 { // cwg2819: 19 ready 2023-12-01 +namespace cwg2819 { // cwg2819: 19 ready 2024-06-26 #if __cpp_constexpr >= 202306L constexpr void* p = nullptr; constexpr int* q = static_cast<int*>(p); >From 094a538c604f1013e0480e53159dfc5952777e7a Mon Sep 17 00:00:00 2001 From: Mital Ashok <mi...@mitalashok.co.uk> Date: Sun, 30 Jun 2024 13:40:46 +0100 Subject: [PATCH 04/10] CWG2882/2883/2886: Update date No wording changed when the status changed from tentatively ready -> ready https://github.com/cplusplus/CWG/commit/4fb18cf3b813f9318b57e769d075a2fb9be3575e#diff-68b7577cc815e0ac6fc6d9b6dc964ef521088944b2bf3c0b9492c81241deeb09 --- clang/test/CXX/drs/cwg28xx.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clang/test/CXX/drs/cwg28xx.cpp b/clang/test/CXX/drs/cwg28xx.cpp index bd6f48eb6c3d0..86fed5a57c861 100644 --- a/clang/test/CXX/drs/cwg28xx.cpp +++ b/clang/test/CXX/drs/cwg28xx.cpp @@ -220,7 +220,7 @@ void f() { } // namespace cwg2881 -namespace cwg2882 { // cwg2882: 2.7 ready 2024-05-31 +namespace cwg2882 { // cwg2882: 2.7 ready 2024-06-27 struct C { operator void() = delete; // expected-warning@-1 {{conversion function converting 'cwg2882::C' to 'void' will never be used}} @@ -232,7 +232,7 @@ void f(C c) { } } // namespace cwg2882 -namespace cwg2883 { // cwg2883: no ready 2024-05-31 +namespace cwg2883 { // cwg2883: no ready 2024-06-27 #if __cplusplus >= 201103L void f() { int x; @@ -271,7 +271,7 @@ static_assert(!__is_trivially_constructible(B)); #endif } // namespace cwg2885 -namespace cwg2886 { // cwg2886: 9 ready 2024-05-31 +namespace cwg2886 { // cwg2886: 9 ready 2024-06-27 #if __cplusplus >= 201103L struct C { C() = default; >From 2d2178d98ef87f3baf838e064cba5f23049073bf Mon Sep 17 00:00:00 2001 From: Mital Ashok <mi...@mitalashok.co.uk> Date: Sun, 30 Jun 2024 13:43:12 +0100 Subject: [PATCH 05/10] CWG2885: Update date No wording changed when the status changed from tentatively ready -> review https://github.com/cplusplus/CWG/commit/858b5e8c1041202d8a1dc6dbd7261810df7bfc79#diff-e0e6ed8a272741d6e662722daaef5dc2682c113d6ef698b3228c3b01dfa30a93 --- clang/test/CXX/drs/cwg28xx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/test/CXX/drs/cwg28xx.cpp b/clang/test/CXX/drs/cwg28xx.cpp index 86fed5a57c861..7426cea5cbe91 100644 --- a/clang/test/CXX/drs/cwg28xx.cpp +++ b/clang/test/CXX/drs/cwg28xx.cpp @@ -257,7 +257,7 @@ void g() { #endif } // namespace cwg2883 -namespace cwg2885 { // cwg2885: 16 review 2024-05-31 +namespace cwg2885 { // cwg2885: 16 review 2024-06-28 #if __cplusplus >= 202002L template <class T> struct A { >From c1e101ff429e34395037654b26296c657ae65fe8 Mon Sep 17 00:00:00 2001 From: Mital Ashok <mi...@mitalashok.co.uk> Date: Sun, 30 Jun 2024 13:23:51 +0100 Subject: [PATCH 06/10] CWG2881: Update date for new wording A new example was also added and Clang rejects it as expected https://github.com/cplusplus/CWG/commit/d7a3a3d302336cd467ac09867b8a19105c34346c The wording change is: 2024-05-17: - Attempting to give a type not permitted for an explicit object parameter of a lambda's function call operator (7.5.5.2 expr.prim.lambda.closure) 2024-06-26: - Attempting to give to an explicit object parameter of a lambda's function call operator a type not peremitted for such (7.5.5.2 expr.prim.lambda.closure) --- clang/test/CXX/drs/cwg28xx.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/clang/test/CXX/drs/cwg28xx.cpp b/clang/test/CXX/drs/cwg28xx.cpp index 7426cea5cbe91..f31edf06d7928 100644 --- a/clang/test/CXX/drs/cwg28xx.cpp +++ b/clang/test/CXX/drs/cwg28xx.cpp @@ -150,7 +150,7 @@ void g() { #endif } // namespace cwg2877 -namespace cwg2881 { // cwg2881: 19 ready 2024-04-19 +namespace cwg2881 { // cwg2881: 19 ready 2024-06-26 #if __cplusplus >= 202302L @@ -216,6 +216,18 @@ void f() { o.decltype(L2)::operator()(); } +int main() { + int x = 0; + auto lambda = [x] (this auto self) { return x; }; + using Lambda = decltype(lambda); + struct D : private Lambda { // expected-note {{declared private here}} + D(Lambda l) : Lambda(l) {} + using Lambda::operator(); + friend Lambda; + } d(lambda); + d(); // expected-error {{invalid explicit object parameter type 'D' in lambda with capture; the type must derive publicly from the lambda}} +} + #endif } // namespace cwg2881 >From f5327be184045703388f46996a70b79230f407b7 Mon Sep 17 00:00:00 2001 From: Mital Ashok <mi...@mitalashok.co.uk> Date: Sun, 30 Jun 2024 13:22:19 +0100 Subject: [PATCH 07/10] CWG2877: Update date, update comments in example Only the comments in the example code were changed so there should be no functional difference https://github.com/cplusplus/CWG/commit/b7022853d731983a4b15d0a3a5b4ca49dc1ff366 --- clang/test/CXX/drs/cwg28xx.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clang/test/CXX/drs/cwg28xx.cpp b/clang/test/CXX/drs/cwg28xx.cpp index f31edf06d7928..a2e689fbba74a 100644 --- a/clang/test/CXX/drs/cwg28xx.cpp +++ b/clang/test/CXX/drs/cwg28xx.cpp @@ -134,18 +134,18 @@ struct A { } // namespace cwg2858 -namespace cwg2877 { // cwg2877: 19 ready 2024-05-31 +namespace cwg2877 { // cwg2877: 19 ready 2024-06-26 #if __cplusplus >= 202002L enum E { x }; void f() { int E; - using enum E; // OK, names ::E + using enum E; // OK } using F = E; -using enum F; // OK, designates ::E +using enum F; // OK template<class T> using EE = T; void g() { - using enum EE<E>; // OK, designates ::E + using enum EE<E>; // OK } #endif } // namespace cwg2877 >From 6093821889f0e274751fd1cb40486e85062ed4ba Mon Sep 17 00:00:00 2001 From: Mital Ashok <mi...@mitalashok.co.uk> Date: Sun, 30 Jun 2024 13:47:38 +0100 Subject: [PATCH 08/10] run make_cxx_dr_status --- clang/www/cxx_dr_status.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html index 64b361976a5a5..363edc854fb52 100755 --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -15181,7 +15181,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td><a href="https://cplusplus.github.io/CWG/issues/2561.html">2561</a></td> <td>ready</td> <td>Conversion to function pointer for lambda with explicit object parameter</td> - <td title="Clang does not implement 2024-03-18 resolution" align="center">Not Resolved*</td> + <td title="Clang does not implement 2024-06-25 resolution" align="center">Not Resolved*</td> </tr> <tr class="open" id="2562"> <td><a href="https://cplusplus.github.io/CWG/issues/2562.html">2562</a></td> @@ -16730,7 +16730,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td><a href="https://cplusplus.github.io/CWG/issues/2819.html">2819</a></td> <td>ready</td> <td>Cast from null pointer value in a constant expression</td> - <td title="Clang 19 implements 2023-12-01 resolution" align="center">Not Resolved*</td> + <td title="Clang 19 implements 2024-06-26 resolution" align="center">Not Resolved*</td> </tr> <tr id="2820"> <td><a href="https://cplusplus.github.io/CWG/issues/2820.html">2820</a></td> @@ -17078,7 +17078,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td><a href="https://cplusplus.github.io/CWG/issues/2877.html">2877</a></td> <td>ready</td> <td>Type-only lookup for <I>using-enum-declarator</I></td> - <td title="Clang 19 implements 2024-05-31 resolution" align="center">Not Resolved*</td> + <td title="Clang 19 implements 2024-06-26 resolution" align="center">Not Resolved*</td> </tr> <tr class="open" id="2878"> <td><a href="https://cplusplus.github.io/CWG/issues/2878.html">2878</a></td> @@ -17102,19 +17102,19 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td><a href="https://cplusplus.github.io/CWG/issues/2881.html">2881</a></td> <td>ready</td> <td>Type restrictions for the explicit object parameter of a lambda</td> - <td title="Clang 19 implements 2024-04-19 resolution" align="center">Not Resolved*</td> + <td title="Clang 19 implements 2024-06-26 resolution" align="center">Not Resolved*</td> </tr> <tr class="open" id="2882"> <td><a href="https://cplusplus.github.io/CWG/issues/2882.html">2882</a></td> <td>ready</td> <td>Unclear treatment of conversion to <TT>void</TT></td> - <td title="Clang 2.7 implements 2024-05-31 resolution" align="center">Not Resolved*</td> + <td title="Clang 2.7 implements 2024-06-27 resolution" align="center">Not Resolved*</td> </tr> <tr class="open" id="2883"> <td><a href="https://cplusplus.github.io/CWG/issues/2883.html">2883</a></td> <td>ready</td> <td>Definition of "odr-usable" ignores lambda scopes</td> - <td title="Clang does not implement 2024-05-31 resolution" align="center">Not Resolved*</td> + <td title="Clang does not implement 2024-06-27 resolution" align="center">Not Resolved*</td> </tr> <tr id="2884"> <td><a href="https://cplusplus.github.io/CWG/issues/2884.html">2884</a></td> @@ -17126,13 +17126,13 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td><a href="https://cplusplus.github.io/CWG/issues/2885.html">2885</a></td> <td>review</td> <td>Non-eligible trivial default constructors</td> - <td title="Clang 16 implements 2024-05-31 resolution" align="center">Not Resolved*</td> + <td title="Clang 16 implements 2024-06-28 resolution" align="center">Not Resolved*</td> </tr> <tr class="open" id="2886"> <td><a href="https://cplusplus.github.io/CWG/issues/2886.html">2886</a></td> <td>ready</td> <td>Temporaries and trivial potentially-throwing special member functions</td> - <td title="Clang 9 implements 2024-05-31 resolution" align="center">Not Resolved*</td> + <td title="Clang 9 implements 2024-06-27 resolution" align="center">Not Resolved*</td> </tr> <tr class="open" id="2887"> <td><a href="https://cplusplus.github.io/CWG/issues/2887.html">2887</a></td> >From b352930c4705d1167a66b7e54727295834c44501 Mon Sep 17 00:00:00 2001 From: Mital Ashok <mi...@mitalashok.co.uk> Date: Sun, 30 Jun 2024 18:34:04 +0100 Subject: [PATCH 09/10] Update cwg28xx.cpp Use same error format as the other tests --- clang/test/CXX/drs/cwg28xx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/test/CXX/drs/cwg28xx.cpp b/clang/test/CXX/drs/cwg28xx.cpp index a2e689fbba74a..158e40a52bced 100644 --- a/clang/test/CXX/drs/cwg28xx.cpp +++ b/clang/test/CXX/drs/cwg28xx.cpp @@ -225,7 +225,7 @@ int main() { using Lambda::operator(); friend Lambda; } d(lambda); - d(); // expected-error {{invalid explicit object parameter type 'D' in lambda with capture; the type must derive publicly from the lambda}} + d(); // expected-error {{must derive publicly from the lambda}} } #endif >From 8fea7172d7eb9df11e7297ee3283ff1d60b49b66 Mon Sep 17 00:00:00 2001 From: Mital Ashok <mi...@mitalashok.co.uk> Date: Mon, 1 Jul 2024 19:17:27 +0100 Subject: [PATCH 10/10] CWG2881: Add SFINAE tests --- clang/test/CXX/drs/cwg28xx.cpp | 41 +++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/clang/test/CXX/drs/cwg28xx.cpp b/clang/test/CXX/drs/cwg28xx.cpp index 158e40a52bced..d97ce8565cb3e 100644 --- a/clang/test/CXX/drs/cwg28xx.cpp +++ b/clang/test/CXX/drs/cwg28xx.cpp @@ -153,6 +153,8 @@ void g() { namespace cwg2881 { // cwg2881: 19 ready 2024-06-26 #if __cplusplus >= 202302L +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Winaccessible-base" template <typename T> struct A : T {}; template <typename T> struct B : T {}; @@ -216,7 +218,7 @@ void f() { o.decltype(L2)::operator()(); } -int main() { +void f2() { int x = 0; auto lambda = [x] (this auto self) { return x; }; using Lambda = decltype(lambda); @@ -228,6 +230,43 @@ int main() { d(); // expected-error {{must derive publicly from the lambda}} } +template <typename L> +struct Private : private L { + using L::operator(); + Private(L l) : L(l) {} +}; + +template<typename T> +struct Indirect : T { + using T::operator(); +}; + +template<typename T> +struct Ambiguous : Indirect<T>, T { + using Indirect<T>::operator(); +}; + +template <typename L> +constexpr auto f3(L l) -> decltype(Private<L>{l}()) { return l(); } +// expected-note@-1 {{must derive publicly from the lambda}} + +template <typename L> +constexpr auto f4(L l) -> decltype(Ambiguous<L>{{l}, l}()) { return l(); } +// expected-note@-1 {{is inaccessible due to ambiguity}} + +template<typename T> +concept is_callable = requires(T t) { { t() }; }; + +void g() { + int x = 0; + auto lambda = [x](this auto self) {}; + f3(lambda); // expected-error {{no matching function for call to 'f3'}} + f4(lambda); // expected-error {{no matching function for call to 'f4'}} + static_assert(!is_callable<Private<decltype(lambda)>>); + static_assert(!is_callable<Ambiguous<decltype(lambda)>>); +} + +#pragma clang diagnostic pop #endif } // namespace cwg2881 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits