llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) <details> <summary>Changes</summary> This patch brings our C++ DR status page up to date with WG21 updates. [CWG1223](https://cplusplus.github.io/CWG/issues/1223.html) "Syntactic disambiguation and _trailing-return-types_" is resolved by [P2915R0](https://wg21.link/p2915r0) "Proposed resolution for CWG1223". Both the test and the paper were written by @<!-- -->cor3ntin, so I presume no updates are needed. [CWG2819](https://cplusplus.github.io/CWG/issues/2819.html) "Cast from null pointer value in a constant expression" was revisited and marked as not a DR, so I updated the test to ensure that the example is not accepted in C++23 and earlier modes. CC @<!-- -->offsetof. Tentantive resolutions to the following issues were simply promoted to actual resolutions, so tests doesn't require any meaningful changes: - [CWG2913](https://cplusplus.github.io/CWG/issues/2913.html) "Grammar for deduction-guide has requires-clause in the wrong position" (@<!-- -->zyn0217) - [CWG2915](https://cplusplus.github.io/CWG/issues/2915.html) "Explicit object parameters of type void" (@<!-- -->MitalAshok) - [CWG2922](https://cplusplus.github.io/CWG/issues/2922.html) "constexpr placement-new is too permissive" (@<!-- -->cor3ntin) As a drive-by fix, I updated the `make_cxx_dr_status` script to accommodate for `C++23 onwards` and `C++26 onwards` statuses, which are useful for Core issues that are not DRs. --- Patch is 42.89 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/121642.diff 5 Files Affected: - (modified) clang/test/CXX/drs/cwg12xx.cpp (+1-1) - (modified) clang/test/CXX/drs/cwg28xx.cpp (+15-10) - (modified) clang/test/CXX/drs/cwg29xx.cpp (+3-3) - (modified) clang/www/cxx_dr_status.html (+388-146) - (modified) clang/www/make_cxx_dr_status (+6) ``````````diff diff --git a/clang/test/CXX/drs/cwg12xx.cpp b/clang/test/CXX/drs/cwg12xx.cpp index cdfbc6d6726581..951c71a9832de1 100644 --- a/clang/test/CXX/drs/cwg12xx.cpp +++ b/clang/test/CXX/drs/cwg12xx.cpp @@ -32,7 +32,7 @@ namespace cwg1213 { // cwg1213: 7 } #if __cplusplus >= 201103L -namespace cwg1223 { // cwg1223: 17 drafting 2023-05-12 +namespace cwg1223 { // cwg1223: 17 struct M; template <typename T> struct V; diff --git a/clang/test/CXX/drs/cwg28xx.cpp b/clang/test/CXX/drs/cwg28xx.cpp index ff625a4a985bcc..40e2b25eedde09 100644 --- a/clang/test/CXX/drs/cwg28xx.cpp +++ b/clang/test/CXX/drs/cwg28xx.cpp @@ -1,9 +1,9 @@ // RUN: %clang_cc1 -std=c++98 -pedantic-errors -verify=expected,cxx98 %s -// RUN: %clang_cc1 -std=c++11 -pedantic-errors -verify=expected %s -// RUN: %clang_cc1 -std=c++14 -pedantic-errors -verify=expected %s -// RUN: %clang_cc1 -std=c++17 -pedantic-errors -verify=expected %s -// RUN: %clang_cc1 -std=c++20 -pedantic-errors -verify=expected,since-cxx20 %s -// RUN: %clang_cc1 -std=c++23 -pedantic-errors -verify=expected,since-cxx20,since-cxx23 %s +// RUN: %clang_cc1 -std=c++11 -pedantic-errors -verify=expected,cxx11-23 %s +// RUN: %clang_cc1 -std=c++14 -pedantic-errors -verify=expected,cxx11-23 %s +// RUN: %clang_cc1 -std=c++17 -pedantic-errors -verify=expected,cxx11-23 %s +// RUN: %clang_cc1 -std=c++20 -pedantic-errors -verify=expected,cxx11-23,since-cxx20 %s +// RUN: %clang_cc1 -std=c++23 -pedantic-errors -verify=expected,cxx11-23,since-cxx20,since-cxx23 %s // RUN: %clang_cc1 -std=c++2c -pedantic-errors -verify=expected,since-cxx20,since-cxx23,since-cxx26 %s @@ -47,12 +47,17 @@ void f() { #endif } // namespace cwg2813 -namespace cwg2819 { // cwg2819: 19 tentatively ready 2023-12-01 - -#if __cpp_constexpr >= 202306L +namespace cwg2819 { // cwg2819: 19 c++26 +#if __cplusplus >= 201103L + // CWG 2024-04-19: This issue is not a DR. constexpr void* p = nullptr; - constexpr int* q = static_cast<int*>(p); - static_assert(q == nullptr); + constexpr int* q = static_cast<int*>(p); // #cwg2819-q + // cxx11-23-error@-1 {{constexpr variable 'q' must be initialized by a constant expression}} + // cxx11-23-note@-2 {{cast from 'void *' is not allowed in a constant expression}} + static_assert(q == nullptr, ""); + // cxx11-23-error@-1 {{static assertion expression is not an integral constant expression}} + // cxx11-23-note@-2 {{initializer of 'q' is not a constant expression}} + // cxx11-23-note@#cwg2819-q {{declared here}} #endif } diff --git a/clang/test/CXX/drs/cwg29xx.cpp b/clang/test/CXX/drs/cwg29xx.cpp index 9629bdd41a2a56..2aa52ad98ada85 100644 --- a/clang/test/CXX/drs/cwg29xx.cpp +++ b/clang/test/CXX/drs/cwg29xx.cpp @@ -6,7 +6,7 @@ // RUN: %clang_cc1 -std=c++23 -pedantic-errors -verify=expected %s // RUN: %clang_cc1 -std=c++2c -pedantic-errors -verify=expected %s -namespace cwg2913 { // cwg2913: 20 tentatively ready 2024-08-16 +namespace cwg2913 { // cwg2913: 20 #if __cplusplus >= 202002L @@ -26,7 +26,7 @@ R(T, T) requires true -> R<T>; // expected-error {{expected function body after } // namespace cwg2913 -namespace cwg2915 { // cwg2915: 20 tentatively ready 2024-08-16 +namespace cwg2915 { // cwg2915: 20 #if __cplusplus >= 202302L struct A { void f(this void); // expected-error {{explicit object parameter cannot have 'void' type}} @@ -61,7 +61,7 @@ void *operator new(std::size_t, void *p) { return p; } void* operator new[] (std::size_t, void* p) {return p;} -namespace cwg2922 { // cwg2922: 20 tentatively ready 2024-07-10 +namespace cwg2922 { // cwg2922: 20 union U { int a, b; }; constexpr U nondeterministic(bool i) { if(i) { diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html index 386c57250b7db6..c069e155fd547c 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 id="233"> <td><a href="https://cplusplus.github.io/CWG/issues/233.html">233</a></td> - <td>DR</td> + <td>DRWP</td> <td>References vs pointers in UDC overload resolution</td> <td class="unknown" align="center">Unknown</td> </tr> @@ -7153,15 +7153,11 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td>Unnecessary restriction on <TT>auto</TT> array types</td> <td class="unknown" align="center">Unknown</td> </tr> - <tr class="open" id="1223"> + <tr id="1223"> <td><a href="https://cplusplus.github.io/CWG/issues/1223.html">1223</a></td> - <td>drafting</td> + <td>DRWP</td> <td>Syntactic disambiguation and <I>trailing-return-type</I>s</td> - <td align="center"> - <details> - <summary>Not resolved</summary> - Clang 17 implements 2023-05-12 resolution - </details></td> + <td class="full" align="center">Clang 17</td> </tr> <tr id="1224"> <td><a href="https://cplusplus.github.io/CWG/issues/1224.html">1224</a></td> @@ -8945,11 +8941,11 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td>Alias template specialization vs pack expansion</td> <td class="unknown" align="center">Unknown</td> </tr> - <tr class="open" id="1521"> + <tr id="1521"> <td><a href="https://cplusplus.github.io/CWG/issues/1521.html">1521</a></td> - <td>drafting</td> + <td>dup</td> <td><TT>T{</TT><I>expr</I><TT>}</TT> with reference types</td> - <td align="center">Not resolved</td> + <td class="unknown" align="center">Unknown</td> </tr> <tr id="1522"> <td><a href="https://cplusplus.github.io/CWG/issues/1522.html">1522</a></td> @@ -11545,11 +11541,11 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td>Constant expressions and library undefined behavior</td> <td class="unknown" align="center">Unknown</td> </tr> - <tr class="open" id="1953"> + <tr id="1953"> <td><a href="https://cplusplus.github.io/CWG/issues/1953.html">1953</a></td> - <td>open</td> + <td>DR</td> <td>Data races and common initial sequence</td> - <td align="center">Not resolved</td> + <td class="unknown" align="center">Unknown</td> </tr> <tr id="1954"> <td><a href="https://cplusplus.github.io/CWG/issues/1954.html">1954</a></td> @@ -11619,7 +11615,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="1965"> <td><a href="https://cplusplus.github.io/CWG/issues/1965.html">1965</a></td> - <td>drafting</td> + <td>open</td> <td>Explicit casts to reference types</td> <td align="center">Not resolved</td> </tr> @@ -12693,7 +12689,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr id="2144"> <td><a href="https://cplusplus.github.io/CWG/issues/2144.html">2144</a></td> - <td>DR</td> + <td>DRWP</td> <td>Function/variable declaration ambiguity</td> <td class="unknown" align="center">Unknown</td> </tr> @@ -13525,11 +13521,11 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td>Consistency with mismatched aligned/non-over-aligned allocation/deallocation functions</td> <td class="unknown" align="center">Unknown</td> </tr> - <tr class="open" id="2283"> + <tr id="2283"> <td><a href="https://cplusplus.github.io/CWG/issues/2283.html">2283</a></td> - <td>drafting</td> + <td>DR</td> <td>Missing complete type requirements</td> - <td align="center">Not resolved</td> + <td class="unknown" align="center">Unknown</td> </tr> <tr class="open" id="2284"> <td><a href="https://cplusplus.github.io/CWG/issues/2284.html">2284</a></td> @@ -15183,7 +15179,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2557"> <td><a href="https://cplusplus.github.io/CWG/issues/2557.html">2557</a></td> - <td>drafting</td> + <td>review</td> <td>Class member access referring to an unrelated class</td> <td align="center">Not resolved</td> </tr> @@ -15207,7 +15203,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr id="2561"> <td><a href="https://cplusplus.github.io/CWG/issues/2561.html">2561</a></td> - <td>DR</td> + <td>DRWP</td> <td>Conversion to function pointer for lambda with explicit object parameter</td> <td class="none" align="center">No</td> </tr> @@ -15373,7 +15369,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr id="2588"> <td><a href="https://cplusplus.github.io/CWG/issues/2588.html">2588</a></td> - <td>DR</td> + <td>DRWP</td> <td>friend declarations and module linkage</td> <td class="unknown" align="center">Unknown</td> </tr> @@ -16213,7 +16209,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr id="2728"> <td><a href="https://cplusplus.github.io/CWG/issues/2728.html">2728</a></td> - <td>DR</td> + <td>DRWP</td> <td>Evaluation of conversions in a <I>delete-expression</I></td> <td class="unknown" align="center">Unknown</td> </tr> @@ -16734,11 +16730,11 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td>Alignment requirement of incomplete class type</td> <td class="unknown" align="center">Unknown</td> </tr> - <tr class="open" id="2815"> + <tr id="2815"> <td><a href="https://cplusplus.github.io/CWG/issues/2815.html">2815</a></td> - <td>tentatively ready</td> + <td>DR</td> <td>Overload resolution for references/pointers to <TT>noexcept</TT> functions</td> - <td align="center">Not resolved</td> + <td class="unknown" align="center">Unknown</td> </tr> <tr class="open" id="2816"> <td><a href="https://cplusplus.github.io/CWG/issues/2816.html">2816</a></td> @@ -16754,15 +16750,15 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr id="2818"> <td><a href="https://cplusplus.github.io/CWG/issues/2818.html">2818</a></td> - <td>DR</td> + <td>DRWP</td> <td>Use of predefined reserved identifiers</td> <td class="unknown" align="center">Unknown</td> </tr> <tr id="2819"> <td><a href="https://cplusplus.github.io/CWG/issues/2819.html">2819</a></td> - <td>accepted</td> + <td>WP</td> <td>Cast from null pointer value in a constant expression</td> - <td class="full" align="center">Clang 19</td> + <td class="full" align="center">Clang 19 (C++26 onwards)</td> </tr> <tr id="2820"> <td><a href="https://cplusplus.github.io/CWG/issues/2820.html">2820</a></td> @@ -16862,7 +16858,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr id="2836"> <td><a href="https://cplusplus.github.io/CWG/issues/2836.html">2836</a></td> - <td>DR</td> + <td>DRWP</td> <td>Conversion rank of <TT>long double</TT> and extended floating-point types</td> <td class="unknown" align="center">Unknown</td> </tr> @@ -16904,7 +16900,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr class="open" id="2843"> <td><a href="https://cplusplus.github.io/CWG/issues/2843.html">2843</a></td> - <td>review</td> + <td>drafting</td> <td>Undated reference to Unicode makes C++ a moving target</td> <td align="center">Not resolved</td> </tr> @@ -16998,13 +16994,13 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr id="2858"> <td><a href="https://cplusplus.github.io/CWG/issues/2858.html">2858</a></td> - <td>accepted</td> + <td>WP</td> <td>Declarative <I>nested-name-specifier</I>s and <I>pack-index-specifier</I>s</td> <td class="full" align="center">Clang 19</td> </tr> <tr id="2859"> <td><a href="https://cplusplus.github.io/CWG/issues/2859.html">2859</a></td> - <td>DR</td> + <td>DRWP</td> <td>Value-initialization with multiple default constructors</td> <td class="unknown" align="center">Unknown</td> </tr> @@ -17016,7 +17012,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr id="2861"> <td><a href="https://cplusplus.github.io/CWG/issues/2861.html">2861</a></td> - <td>DR</td> + <td>DRWP</td> <td><TT>dynamic_cast</TT> on bad pointer value</td> <td class="unknown" align="center">Unknown</td> </tr> @@ -17034,13 +17030,13 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr id="2864"> <td><a href="https://cplusplus.github.io/CWG/issues/2864.html">2864</a></td> - <td>DR</td> + <td>DRWP</td> <td>Narrowing floating-point conversions</td> <td class="unknown" align="center">Unknown</td> </tr> <tr id="2865"> <td><a href="https://cplusplus.github.io/CWG/issues/2865.html">2865</a></td> - <td>DR</td> + <td>DRWP</td> <td>Regression on result of conditional operator</td> <td class="unknown" align="center">Unknown</td> </tr> @@ -17052,7 +17048,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr id="2867"> <td><a href="https://cplusplus.github.io/CWG/issues/2867.html">2867</a></td> - <td>DR</td> + <td>DRWP</td> <td>Order of initialization for structured bindings</td> <td class="unknown" align="center">Unknown</td> </tr> @@ -17064,25 +17060,25 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr id="2869"> <td><a href="https://cplusplus.github.io/CWG/issues/2869.html">2869</a></td> - <td>DR</td> + <td>DRWP</td> <td><TT>this</TT> in local classes</td> <td class="unknown" align="center">Unknown</td> </tr> <tr id="2870"> <td><a href="https://cplusplus.github.io/CWG/issues/2870.html">2870</a></td> - <td>DR</td> + <td>DRWP</td> <td>Combining absent <I>encoding-prefix</I>es</td> <td class="unknown" align="center">Unknown</td> </tr> <tr id="2871"> <td><a href="https://cplusplus.github.io/CWG/issues/2871.html">2871</a></td> - <td>DR</td> + <td>DRWP</td> <td>User-declared constructor templates inhibiting default constructors</td> <td class="unknown" align="center">Unknown</td> </tr> <tr id="2872"> <td><a href="https://cplusplus.github.io/CWG/issues/2872.html">2872</a></td> - <td>DR</td> + <td>DRWP</td> <td>Linkage and unclear "can be referred to"</td> <td class="unknown" align="center">Unknown</td> </tr> @@ -17094,7 +17090,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr id="2874"> <td><a href="https://cplusplus.github.io/CWG/issues/2874.html">2874</a></td> - <td>DR</td> + <td>DRWP</td> <td>Qualified declarations of partial specializations</td> <td class="unknown" align="center">Unknown</td> </tr> @@ -17106,13 +17102,13 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr id="2876"> <td><a href="https://cplusplus.github.io/CWG/issues/2876.html">2876</a></td> - <td>accepted</td> + <td>WP</td> <td>Disambiguation of <TT>T x = delete("text")</TT></td> <td class="unknown" align="center">Unknown</td> </tr> <tr id="2877"> <td><a href="https://cplusplus.github.io/CWG/issues/2877.html">2877</a></td> - <td>DR</td> + <td>DRWP</td> <td>Type-only lookup for <I>using-enum-declarator</I></td> <td class="full" align="center">Clang 19</td> </tr> @@ -17122,33 +17118,33 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td>C-style casts to reference types</td> <td align="center">Not resolved</td> </tr> - <tr class="open" id="2879"> + <tr id="2879"> <td><a href="https://cplusplus.github.io/CWG/issues/2879.html">2879</a></td> - <td>review</td> + <td>DR</td> <td>Undesired outcomes with <TT>const_cast</TT></td> - <td align="center">Not resolved</td> + <td class="unknown" align="center">Unknown</td> </tr> <tr id="2880"> <td><a href="https://cplusplus.github.io/CWG/issues/2880.html">2880</a></td> - <td>accepted</td> + <td>WP</td> <td>Accessibility check for destructor of incomplete class type</td> <td class="unknown" align="center">Unknown</td> </tr> <tr id="2881"> <td><a href="https://cplusplus.github.io/CWG/issues/2881.html">2881</a></td> - <td>DR</td> + <td>DRWP</td> <td>Type restrictions for the explicit object parameter of a lambda</td> <td class="full" align="center">Clang 19</td> </tr> <tr id="2882"> <td><a href="https://cplusplus.github.io/CWG/issues/2882.html">2882</a></td> - <td>DR</td> + <td>DRWP</td> <td>Unclear treatment of conversion to <TT>void</TT></td> <td class="full" align="center">Clang 2.7</td> </tr> <tr id="2883"> <td><a href="https://cplusplus.github.io/CWG/issues/2883.html">2883</a></td> - <td>DR</td> + <td>DRWP</td> <td>Definition of "odr-usable" ignores lambda scopes</td> <td class="none" align="center">No</td> </tr> @@ -17170,13 +17166,13 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> </tr> <tr id="2886"> <td><a href="https://cplusplus.github.io/CWG/issues/2886.html">2886</a></td> - <td>DR</td> + <td>DRWP</td> <td>Temporaries and trivial potentially-throwing special member functions</td> <td class="full" align="center">Clang 9</td> </tr> <tr id="2887"> <td><a href="https://cplusplus.github.io/CWG/issues/2887.html">2887</a></td> - <td>DR</td> + <td>DRWP</td> <td>Missing compatibility entries for xvalues</td> <td class="unknown" align="center">Unknown</td> </tr> @@ -17192,21 +17188,21 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td>Requiring an accessible destructor for destroying operator delete</td> <td align="center">Not resolved</td> </tr> - <tr class="open" id="2890"> + <tr id="2890"> <td><a href="https://cplusplus.github.io/CWG/issues/2890.html">2890</a></td> - <td>review</td> + <td>DR</td> <td>Defining members of local classes</td> - <td align="center">Not resolved</td> + <td class="unknown" align="center">Unknown</td> </tr> <tr id="2891"> <td><a href="https://cplusplus.github.io/CWG/issues/2891.html">2891</a></td> - <td>DR</td> + <td>DRWP</td> <td>Normative status of implementation limits</td> <td class="unknown" align="center">Unknown</td> </tr> <tr id="2892"> <td><a href="https://cplusplus.github.io/CWG/issues/2892.html">2892</a></td> - <td>DR</td> + <td>DRWP</td> <td>Unclear usual arithmetic conversions</td> <td class="unknown" align="center">Unknown</td> </tr> @@ -17216,15 +17212,15 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td>Instantiations in discarded <TT>if constexpr</TT> substatements</td> <td class="unknown" align="center">Unknown</td> </tr> - <tr class="open" id="2894"> + <tr id="2894"> <td><a href="https://cplusplus.github.io/CWG/issues/2894.html">2894</a></td> - <td>review</td> + <td>DR</td> <td>Functional casts create prvalues of reference type</td> - <td align="center">Not resolved</td> + <td class="unknown" align="center">Unknown</td> </tr> <tr id="2895"> <td><a href="https://cplusplus.github.io/CWG/issues/2895.html">2895</a></td> - <td>DR</td> + <td>DRWP</td> <td>Initialization should ignore the destination type's cv-qualification</td> <td class="unknown" align="center">Unknown</td> </tr> @@ -17246,11 +17242,11 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td>Clarify implicit conversion sequence from <I>cv</I> <TT>T</TT> to <TT>T</TT></td> <td align="center">Not resolved</td> </tr> - <tr class="open" id="2899"> + <tr id="2899"> <td><a href="https://cplusplus.github.io/CWG/issues/2899.html">2899</a></td> - <td>tentatively ready</td> + <td>DR</td> <td>Bad value representations should cause undefined behavior</td> - <td align="center">Not resolved</td> + <td class="unknown" align="center">Unknown</td> </tr> <tr class="open" id="2900"> <td><a href="https://cplusplus.github.io/CWG/issues/2900.html">2900</a></td> @@ -17258,11 +17254,11 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td>Deduction of non-type template arguments with placeholder types</td> <td align="center">Not resolved</td> </tr> - <tr class="open" id="2901"> + <tr id="2901"> <td><a href="https://cplusplus.github.io/CWG/issues/2901.htm... [truncated] `````````` </details> https://github.com/llvm/llvm-project/pull/121642 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits