From 3ede83c6b02674e042b191477cdd04b5ac922ae8 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 4 Jan 2025 14:47:00 +0300 Subject: [PATCH] [clang] Update C++ DR status page --- clang/test/CXX/drs/cwg12xx.cpp | 2 +- clang/test/CXX/drs/cwg28xx.cpp | 25 +- clang/test/CXX/drs/cwg29xx.cpp | 6 +- clang/www/cxx_dr_status.html | 534 ++++++++++++++++++++++++--------- clang/www/make_cxx_dr_status | 6 + 5 files changed, 413 insertions(+), 160 deletions(-) diff --git a/clang/test/CXX/drs/cwg12xx.cpp b/clang/test/CXX/drs/cwg12xx.cpp index cdfbc6d672658..951c71a9832de 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 struct V; diff --git a/clang/test/CXX/drs/cwg28xx.cpp b/clang/test/CXX/drs/cwg28xx.cpp index ff625a4a985bc..40e2b25eedde0 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(p); - static_assert(q == nullptr); + constexpr int* q = static_cast(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 9629bdd41a2a5..2aa52ad98ada8 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; // 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 386c57250b7db..c069e155fd547 100755 --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -1442,7 +1442,7 @@

C++ defect report implementation status

233 - DR + DRWP References vs pointers in UDC overload resolution Unknown @@ -7153,15 +7153,11 @@

C++ defect report implementation status

Unnecessary restriction on auto array types Unknown - + 1223 - drafting + DRWP Syntactic disambiguation and trailing-return-types - -
- Not resolved - Clang 17 implements 2023-05-12 resolution -
+ Clang 17 1224 @@ -8945,11 +8941,11 @@

C++ defect report implementation status

Alias template specialization vs pack expansion Unknown - + 1521 - drafting + dup T{expr} with reference types - Not resolved + Unknown 1522 @@ -11545,11 +11541,11 @@

C++ defect report implementation status

Constant expressions and library undefined behavior Unknown - + 1953 - open + DR Data races and common initial sequence - Not resolved + Unknown 1954 @@ -11619,7 +11615,7 @@

C++ defect report implementation status

1965 - drafting + open Explicit casts to reference types Not resolved @@ -12693,7 +12689,7 @@

C++ defect report implementation status

2144 - DR + DRWP Function/variable declaration ambiguity Unknown @@ -13525,11 +13521,11 @@

C++ defect report implementation status

Consistency with mismatched aligned/non-over-aligned allocation/deallocation functions Unknown - + 2283 - drafting + DR Missing complete type requirements - Not resolved + Unknown 2284 @@ -15183,7 +15179,7 @@

C++ defect report implementation status

2557 - drafting + review Class member access referring to an unrelated class Not resolved @@ -15207,7 +15203,7 @@

C++ defect report implementation status

2561 - DR + DRWP Conversion to function pointer for lambda with explicit object parameter No @@ -15373,7 +15369,7 @@

C++ defect report implementation status

2588 - DR + DRWP friend declarations and module linkage Unknown @@ -16213,7 +16209,7 @@

C++ defect report implementation status

2728 - DR + DRWP Evaluation of conversions in a delete-expression Unknown @@ -16734,11 +16730,11 @@

C++ defect report implementation status

Alignment requirement of incomplete class type Unknown - + 2815 - tentatively ready + DR Overload resolution for references/pointers to noexcept functions - Not resolved + Unknown 2816 @@ -16754,15 +16750,15 @@

C++ defect report implementation status

2818 - DR + DRWP Use of predefined reserved identifiers Unknown 2819 - accepted + WP Cast from null pointer value in a constant expression - Clang 19 + Clang 19 (C++26 onwards) 2820 @@ -16862,7 +16858,7 @@

C++ defect report implementation status

2836 - DR + DRWP Conversion rank of long double and extended floating-point types Unknown @@ -16904,7 +16900,7 @@

C++ defect report implementation status

2843 - review + drafting Undated reference to Unicode makes C++ a moving target Not resolved @@ -16998,13 +16994,13 @@

C++ defect report implementation status

2858 - accepted + WP Declarative nested-name-specifiers and pack-index-specifiers Clang 19 2859 - DR + DRWP Value-initialization with multiple default constructors Unknown @@ -17016,7 +17012,7 @@

C++ defect report implementation status

2861 - DR + DRWP dynamic_cast on bad pointer value Unknown @@ -17034,13 +17030,13 @@

C++ defect report implementation status

2864 - DR + DRWP Narrowing floating-point conversions Unknown 2865 - DR + DRWP Regression on result of conditional operator Unknown @@ -17052,7 +17048,7 @@

C++ defect report implementation status

2867 - DR + DRWP Order of initialization for structured bindings Unknown @@ -17064,25 +17060,25 @@

C++ defect report implementation status

2869 - DR + DRWP this in local classes Unknown 2870 - DR + DRWP Combining absent encoding-prefixes Unknown 2871 - DR + DRWP User-declared constructor templates inhibiting default constructors Unknown 2872 - DR + DRWP Linkage and unclear "can be referred to" Unknown @@ -17094,7 +17090,7 @@

C++ defect report implementation status

2874 - DR + DRWP Qualified declarations of partial specializations Unknown @@ -17106,13 +17102,13 @@

C++ defect report implementation status

2876 - accepted + WP Disambiguation of T x = delete("text") Unknown 2877 - DR + DRWP Type-only lookup for using-enum-declarator Clang 19 @@ -17122,33 +17118,33 @@

C++ defect report implementation status

C-style casts to reference types Not resolved - + 2879 - review + DR Undesired outcomes with const_cast - Not resolved + Unknown 2880 - accepted + WP Accessibility check for destructor of incomplete class type Unknown 2881 - DR + DRWP Type restrictions for the explicit object parameter of a lambda Clang 19 2882 - DR + DRWP Unclear treatment of conversion to void Clang 2.7 2883 - DR + DRWP Definition of "odr-usable" ignores lambda scopes No @@ -17170,13 +17166,13 @@

C++ defect report implementation status

2886 - DR + DRWP Temporaries and trivial potentially-throwing special member functions Clang 9 2887 - DR + DRWP Missing compatibility entries for xvalues Unknown @@ -17192,21 +17188,21 @@

C++ defect report implementation status

Requiring an accessible destructor for destroying operator delete Not resolved - + 2890 - review + DR Defining members of local classes - Not resolved + Unknown 2891 - DR + DRWP Normative status of implementation limits Unknown 2892 - DR + DRWP Unclear usual arithmetic conversions Unknown @@ -17216,15 +17212,15 @@

C++ defect report implementation status

Instantiations in discarded if constexpr substatements Unknown - + 2894 - review + DR Functional casts create prvalues of reference type - Not resolved + Unknown 2895 - DR + DRWP Initialization should ignore the destination type's cv-qualification Unknown @@ -17246,11 +17242,11 @@

C++ defect report implementation status

Clarify implicit conversion sequence from cv T to T Not resolved - + 2899 - tentatively ready + DR Bad value representations should cause undefined behavior - Not resolved + Unknown 2900 @@ -17258,11 +17254,11 @@

C++ defect report implementation status

Deduction of non-type template arguments with placeholder types Not resolved - + 2901 - tentatively ready + DR Unclear semantics for near-match aliased access - Not resolved + Unknown 2902 @@ -17272,7 +17268,7 @@

C++ defect report implementation status

2903 - tentatively ready + drafting Can we omit the template disambiguator in nested-name-specifiers in type-only contexts? Not resolved @@ -17282,47 +17278,47 @@

C++ defect report implementation status

Introducing template-names Not resolved - + 2905 - tentatively ready + DR Value-dependence of noexcept-expression - Not resolved + Unknown - + 2906 - tentatively ready + DR Lvalue-to-rvalue conversion of class types for conditional operator - Not resolved + Unknown - + 2907 - tentatively ready + DR Constant lvalue-to-rvalue conversion on uninitialized std::nullptr_t - Not resolved + Unknown - + 2908 - tentatively ready + DR Counting physical source lines for __LINE__ - Not resolved + Unknown - + 2909 - review + DR Subtle difference between constant-initialized and constexpr - Not resolved + Unknown - + 2910 - tentatively ready + DR Effect of requirement-parameter-lists on odr-usability - Not resolved + Unknown - + 2911 - tentatively ready + DR Unclear meaning of expressions "appearing within" subexpressions - Not resolved + Unknown 2912 @@ -17330,15 +17326,11 @@

C++ defect report implementation status

Too-large value for size in array new Not resolved - + 2913 - tentatively ready + DR Grammar for deduction-guide has requires-clause in the wrong position - -
- Not resolved - Clang 20 implements 2024-08-16 resolution -
+ Clang 20 2914 @@ -17346,15 +17338,11 @@

C++ defect report implementation status

Unclear order of initialization of static and thread-local variables Not resolved - + 2915 - tentatively ready + DR Explicit object parameters of type void - -
- Not resolved - Clang 20 implements 2024-08-16 resolution -
+ Clang 20 2916 @@ -17372,17 +17360,17 @@

C++ defect report implementation status

Clang 20 implements 2024-07-30 resolution - + 2918 - tentatively ready + DR Consideration of constraints for address of overloaded function - Not resolved + Unknown - + 2919 - tentatively ready + DR Conversion function candidates for initialization of const lvalue reference - Not resolved + Unknown 2920 @@ -17390,33 +17378,29 @@

C++ defect report implementation status

The template keyword for base classes Not resolved - + 2921 - tentatively ready + DR Exporting redeclarations of entities not attached to a named module - Not resolved + Unknown - + 2922 - tentatively ready + DR constexpr placement-new is too permissive - -
- Not resolved - Clang 20 implements 2024-07-10 resolution -
+ Clang 20 2923 - tentatively ready + review Note about infinite loops and execution steps Not resolved - + 2924 - review + DR Undefined behavior during constant evaluation - Not resolved + Unknown 2925 @@ -17426,15 +17410,15 @@

C++ defect report implementation status

2926 - open + drafting Lookup context for dependent qualified names Not resolved - + 2927 - tentatively ready + DR Unclear status of translation unit with module keyword - Not resolved + Unknown 2928 @@ -17444,21 +17428,21 @@

C++ defect report implementation status

2929 - tentatively ready + review Lifetime of trivially-destructible static or thread-local objects Not resolved - + 2930 - tentatively ready + DR Unclear term "copy/move operation" in specification of copy elision - Not resolved + Unknown - + 2931 - tentatively ready + DR Restrictions on operator functions that are explicit object member functions - Not resolved + Unknown 2932 @@ -17466,11 +17450,11 @@

C++ defect report implementation status

Value range of empty enumeration Not resolved - + 2933 - open + DR Dangling references - Not resolved + Unknown 2934 @@ -17484,17 +17468,17 @@

C++ defect report implementation status

Destroying the coroutine state when initial-await-resume-called is false Not resolved - + 2936 - open + DR Local classes of templated functions should be part of the current instantiation - Not resolved + Unknown - + 2937 - open + DR Grammar for preprocessing-file has no normative effect - Not resolved + Unknown 2938 @@ -17502,10 +17486,268 @@

C++ defect report implementation status

Inheriting linkage from a previous declaration Not resolved - + 2939 - open + DR Do not allow reinterpret_cast from prvalue to rvalue reference + Unknown + + + 2940 + review + Definition of "object" + Not resolved + + + 2941 + open + Lifetime extension for function-style cast to reference type + Not resolved + + + 2942 + open + Packs in a function's parameter-type-list + Not resolved + + + 2943 + open + Discarding a void return value + Not resolved + + + 2944 + DR + Unsequenced throw-expressions + Unknown + + + 2945 + open + Redundant constraints on matching function template declarations + Not resolved + + + 2946 + open + Dependent call equivalence in non-ADL cases + Not resolved + + + 2947 + open + Limiting macro expansion in pp-module + Not resolved + + + 2948 + open + Late ambiguity for partial template specialization + Not resolved + + + 2949 + open + Treatment of ellipsis during partial ordering + Not resolved + + + 2950 + open + Value preservation in enumeration vs. integer bit-fields + Not resolved + + + 2951 + open + Distinguishing a primary template + Not resolved + + + 2952 + open + Vacuous initialization for subobjects + Not resolved + + + 2953 + open + Value representation for non-trivially-copyable types + Not resolved + + + 2954 + NAD + Simultaneous modifications of an atomic object + Unknown + + + 2955 + open + Unify rules about conflicting unordered accesses + Not resolved + + + 2956 + open + Missing allowance for pseudo-destructors in qualified lookup + Not resolved + + + 2957 + open + Evaluating a reference member should constitute access + Not resolved + + + 2958 + open + Overload resolution involving lvalue transformation and qualification conversion + Not resolved + + + 2959 + open + Naming enumerators in class member access expressions + Not resolved + + + 2960 + open + Introduce discontiguous object lifetime + Not resolved + + + 2961 + open + Checking of ill-formed types in constraint-expressions + Not resolved + + + 2962 + open + Evaluation of destructor call for variable with constant destruction + Not resolved + + + 2963 + open + Paradoxical variable-or-function declaration + Not resolved + + + 2964 + open + Reading "invalid pointer values" + Not resolved + + + 2965 + open + Generic lambdas do not have a template parameter scope + Not resolved + + + 2966 + open + Alignment and value representation of std::nullptr_t + Not resolved + + + 2967 + open + Explicit conversion functions + Not resolved + + + 2968 + open + Name lookup result for typedef-name vs. class-name + Not resolved + + + 2969 + open + Scopes in the function-try-block of a constructor + Not resolved + + + 2970 + open + Races with volatile sig_atomic_t bit-fields + Not resolved + + + 2971 + open + Specializations for a class are not decl-reachable + Not resolved + + + 2972 + open + Declarative nested-name-specifier naming a partial specialization + Not resolved + + + 2973 + open + Does an alias-declaration introduce a name for linkage purposes? + Not resolved + + + 2974 + open + Non-deduced context for qualified-id naming a template + Not resolved + + + 2975 + open + Effect of concept template-head on parameter mappings + Not resolved + + + 2976 + open + Transferring control out of a function + Not resolved + + + 2977 + open + Initialization with string literals + Not resolved + + + 2978 + open + Deduction involving reference to similar types + Not resolved + + + 2979 + open + Duplicate declarations of enumerations in class scope + Not resolved + + + 2980 + open + Constraints on template template parameters + Not resolved + + + 2981 + open + Usual arithmetic conversions and result types + Not resolved + + + 2982 + open + Deduction in type-constraints Not resolved diff --git a/clang/www/make_cxx_dr_status b/clang/www/make_cxx_dr_status index f9a35c61c12de..e0885fdbd2d3c 100755 --- a/clang/www/make_cxx_dr_status +++ b/clang/www/make_cxx_dr_status @@ -169,6 +169,12 @@ def availability(issue): elif status.endswith(' c++20'): status = status[:-6] avail_suffix = ' (C++20 onwards)' + elif status.endswith(' c++23'): + status = status[:-6] + avail_suffix = ' (C++23 onwards)' + elif status.endswith(' c++26'): + status = status[:-6] + avail_suffix = ' (C++26 onwards)' if status == 'unknown': avail = 'Unknown' avail_style = 'unknown'