diff --git a/clang/test/CXX/drs/cwg25xx.cpp b/clang/test/CXX/drs/cwg25xx.cpp index 0934f0cc19c6a..1c0d32fe3fdfc 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 struct C { constexpr C(auto) { } }; diff --git a/clang/test/CXX/drs/cwg28xx.cpp b/clang/test/CXX/drs/cwg28xx.cpp index c77bd433d8e21..9796607a790ce 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 #if __cpp_constexpr >= 202306L constexpr void* p = nullptr; constexpr int* q = static_cast(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 #if __cplusplus > 202302L @@ -134,23 +134,23 @@ struct A { } // namespace cwg2858 -namespace cwg2877 { // cwg2877: 19 tentatively ready 2024-05-31 +namespace cwg2877 { // cwg2877: 19 #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 using EE = T; void g() { - using enum EE; // OK, designates ::E + using enum EE; // OK } #endif } // namespace cwg2877 -namespace cwg2881 { // cwg2881: 19 tentatively ready 2024-04-19 +namespace cwg2881 { // cwg2881: 19 #if __cplusplus >= 202302L @@ -216,11 +216,61 @@ void f() { o.decltype(L2)::operator()(); } +void f2() { + 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 {{must derive publicly from the lambda}} +} + +template +struct Private : private L { + using L::operator(); + Private(L l) : L(l) {} +}; + +template +struct Indirect : T { + using T::operator(); +}; + +template +struct Ambiguous : Indirect, T { // expected-warning {{is inaccessible due to ambiguity}} + using Indirect::operator(); +}; + +template +constexpr auto f3(L l) -> decltype(Private{l}()) { return l(); } +// expected-note@-1 {{must derive publicly from the lambda}} + +template +constexpr auto f4(L l) -> decltype(Ambiguous{{l}, l}()) { return l(); } +// expected-note@-1 {{is inaccessible due to ambiguity}} +// expected-note@-2 {{in instantiation of template class}} + +template +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'}} + // expected-note@-1 {{while substituting deduced template arguments into function template 'f4'}} + static_assert(!is_callable>); + static_assert(!is_callable>); +} + #endif } // namespace cwg2881 -namespace cwg2882 { // cwg2882: 2.7 tentatively ready 2024-05-31 +namespace cwg2882 { // cwg2882: 2.7 struct C { operator void() = delete; // expected-warning@-1 {{conversion function converting 'cwg2882::C' to 'void' will never be used}} @@ -232,7 +282,7 @@ void f(C c) { } } // namespace cwg2882 -namespace cwg2883 { // cwg2883: no tentatively ready 2024-05-31 +namespace cwg2883 { // cwg2883: no #if __cplusplus >= 201103L void f() { int x; @@ -257,7 +307,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 struct A { @@ -271,7 +321,7 @@ static_assert(!__is_trivially_constructible(B)); #endif } // namespace cwg2885 -namespace cwg2886 { // cwg2886: 9 tentatively ready 2024-05-31 +namespace cwg2886 { // cwg2886: 9 #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..61861c9339a45 100755 --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -1440,11 +1440,11 @@

C++ defect report implementation status

Is indirection through a null pointer undefined behavior? Unknown - + 233 - tentatively ready + DR References vs pointers in UDC overload resolution - Not resolved + Unknown 234 @@ -2763,7 +2763,7 @@

C++ defect report implementation status

453 - DR + DRWP References may only bind to “valid” objects Unknown @@ -7329,11 +7329,11 @@

C++ defect report implementation status

Overloading member function templates based on dependent return type Unknown - + 1253 - open + C++17 Generic non-template members - Not resolved + Unknown 1254 @@ -8805,11 +8805,11 @@

C++ defect report implementation status

Lifetime of temporaries in range-based for Unknown - + 1499 - drafting + DRWP Missing case for deleted move assignment operator - Not resolved + Unknown 1500 @@ -9567,11 +9567,11 @@

C++ defect report implementation status

Adding spaces between tokens in stringizing Not resolved - + 1626 - open + dup constexpr member functions in brace-or-equal-initializers - Not resolved + Unknown 1627 @@ -11537,7 +11537,7 @@

C++ defect report implementation status

1954 - DR + DRWP typeid null dereference check in subexpressions Unknown @@ -12675,11 +12675,11 @@

C++ defect report implementation status

Value-dependency via injected-class-name Unknown - + 2144 - tentatively ready + DR Function/variable declaration ambiguity - Not resolved + Unknown 2145 @@ -12707,7 +12707,7 @@

C++ defect report implementation status

2149 - DR + DRWP Brace elision and array length deduction Clang 3.1 @@ -12927,11 +12927,11 @@

C++ defect report implementation status

Cv-qualified numeric types Unknown - + 2186 - drafting + C++20 Unclear point that “preceding initialization” must precede - Not resolved + Unknown 2187 @@ -14669,7 +14669,7 @@

C++ defect report implementation status

2476 - DR + DRWP placeholder-type-specifiers and function declarators Unknown @@ -15011,7 +15011,7 @@

C++ defect report implementation status

2533 - DR + DRWP Storage duration of implicitly created objects Unknown @@ -15089,13 +15089,13 @@

C++ defect report implementation status

2546 - DR + DRWP Defaulted secondary comparison operators defined as deleted Unknown 2547 - DR + DRWP Defaulted comparison operator function for non-classes Unknown @@ -15173,15 +15173,15 @@

C++ defect report implementation status

2560 - DR + DRWP Parameter type determination in a requirement-parameter-list Unknown - + 2561 - tentatively ready + DR Conversion to function pointer for lambda with explicit object parameter - Not Resolved* + No 2562 @@ -15221,7 +15221,7 @@

C++ defect report implementation status

2568 - DR + DRWP Access checking during synthesis of defaulted comparison operator Unknown @@ -15339,11 +15339,11 @@

C++ defect report implementation status

Visible side effects and initial value of an object Not resolved - + 2588 - tentatively ready + DR friend declarations and module linkage - Not resolved + Unknown 2589 @@ -15541,7 +15541,7 @@

C++ defect report implementation status

2621 C++23 Kind of lookup for using enum declarations - Superseded by 2877 + Superseded by 2877 2622 @@ -15617,7 +15617,7 @@

C++ defect report implementation status

2634 - DR + DRWP Avoid circularity in specification of scope for friend class declarations Unknown @@ -15635,13 +15635,13 @@

C++ defect report implementation status

2637 - DR + DRWP Injected-class-name as a simple-template-id Unknown 2638 - DR + DRWP Improve the example for initializing by initializer list Unknown @@ -15755,7 +15755,7 @@

C++ defect report implementation status

2657 - DR + DRWP Cv-qualification adjustment when binding reference to temporary Unknown @@ -15779,7 +15779,7 @@

C++ defect report implementation status

2661 - DR + DRWP Missing disambiguation rule for pure-specifier vs. brace-or-equal-initializer Unknown @@ -15821,7 +15821,7 @@

C++ defect report implementation status

2668 - DR + DRWP co_await in a lambda-expression Unknown @@ -15947,7 +15947,7 @@

C++ defect report implementation status

2689 - DR + DRWP Are cv-qualified std::nullptr_t fundamental types? Unknown @@ -16013,7 +16013,7 @@

C++ defect report implementation status

2700 - DR + DRWP #error disallows existing implementation practice Unknown @@ -16055,7 +16055,7 @@

C++ defect report implementation status

2707 - DR + DRWP Deduction guides cannot have a trailing requires-clause Unknown @@ -16097,7 +16097,7 @@

C++ defect report implementation status

2714 - DR + DRWP Implicit deduction guides omit properties from the parameter-declaration-clause of a constructor Unknown @@ -16179,11 +16179,11 @@

C++ defect report implementation status

Importing header units synthesized from source files Not resolved - + 2728 - tentatively ready + DR Evaluation of conversions in a delete-expression - Not resolved + Unknown 2729 @@ -16283,13 +16283,13 @@

C++ defect report implementation status

2745 - DR + DRWP Dependent odr-use in generic lambdas Unknown 2746 - DR + DRWP Checking of default template arguments Unknown @@ -16301,7 +16301,7 @@

C++ defect report implementation status

2748 - DR + DRWP Accessing static data members via null pointer Unknown @@ -16440,7 +16440,7 @@

C++ defect report implementation status

2771 - DR + DRWP Transformation for unqualified-ids in address operator Clang 18 @@ -16464,7 +16464,7 @@

C++ defect report implementation status

2775 - DR + DRWP Unclear argument type for copy of exception object Unknown @@ -16476,7 +16476,7 @@

C++ defect report implementation status

2777 - DR + DRWP Type of id-expression denoting a template parameter object Unknown @@ -16632,7 +16632,7 @@

C++ defect report implementation status

2803 - DR + DRWP Overload resolution for reference binding of similar types Unknown @@ -16668,19 +16668,19 @@

C++ defect report implementation status

2809 - DR + DRWP An implicit definition does not redeclare a function Unknown 2810 - DR + DRWP Requiring the absence of diagnostics for templates Unknown 2811 - DR + DRWP Clarify "use" of main Clang 3.5 @@ -16692,19 +16692,19 @@

C++ defect report implementation status

2813 - DR + DRWP Class member access with prvalues Unknown - + 2814 - tentatively ready + NAD Alignment requirement of incomplete class type - Not resolved + Unknown 2815 - open + drafting Overload resolution for references/pointers to noexcept functions Not resolved @@ -16720,21 +16720,21 @@

C++ defect report implementation status

sizeof(abstract class) is underspecified Not resolved - + 2818 - tentatively ready + DR Use of predefined reserved identifiers - Not resolved + Unknown - + 2819 - tentatively ready + accepted Cast from null pointer value in a constant expression - Not Resolved* + Clang 19 2820 - DR + DRWP Value-initialization and default constructors Unknown @@ -16746,7 +16746,7 @@

C++ defect report implementation status

2822 - DR + DRWP Side-effect-free pointer zap Unknown @@ -16758,13 +16758,13 @@

C++ defect report implementation status

2824 - DR + DRWP Copy-initialization of arrays Unknown 2825 - DR + DRWP Range-based for statement using a braced-init-list Unknown @@ -16782,7 +16782,7 @@

C++ defect report implementation status

2828 - DR + DRWP Ambiguous interpretation of C-style cast Unknown @@ -16794,13 +16794,13 @@

C++ defect report implementation status

2830 - DR + DRWP Top-level cv-qualification should be ignored for list-initialization Unknown 2831 - DR + DRWP Non-templated function definitions and requires-clauses Unknown @@ -16828,11 +16828,11 @@

C++ defect report implementation status

Name-independent declarations Not resolved - + 2836 - tentatively ready + DR Conversion rank of long double and extended floating-point types - Not resolved + Unknown 2837 @@ -16884,13 +16884,13 @@

C++ defect report implementation status

2845 - DR + DRWP Make the closure type of a captureless lambda a structural type Unknown 2846 - DR + DRWP Out-of-class definitions of explicit object member functions Unknown @@ -16902,25 +16902,25 @@

C++ defect report implementation status

2848 - DR + DRWP Omitting an empty template argument list for explicit instantiation Unknown 2849 - DR + DRWP Parameter objects are not temporary objects Unknown 2850 - DR + DRWP Unclear storage duration for function parameter objects Unknown 2851 - DR + DRWP Allow floating-point conversions in converted constant expressions Unknown @@ -16932,45 +16932,45 @@

C++ defect report implementation status

2853 - DR + DRWP Pointer arithmetic with pointer to hypothetical element Unknown 2854 - DR + DRWP Storage duration of exception objects Unknown 2855 - DR + DRWP Undefined behavior in postfix increment Unknown 2856 - DR + DRWP Copy-list-initialization with explicit default constructors Unknown 2857 - DR + DRWP Argument-dependent lookup with incomplete class types No - + 2858 - tentatively ready + accepted Declarative nested-name-specifiers and pack-index-specifiers - Not Resolved* + Clang 19 - + 2859 - tentatively ready + DR Value-initialization with multiple default constructors - Not resolved + Unknown 2860 @@ -16978,15 +16978,15 @@

C++ defect report implementation status

Remove and fix the term "vacuous initialization" Unknown - + 2861 - tentatively ready + DR dynamic_cast on bad pointer value - Not resolved + Unknown 2862 - tentatively ready + review Unclear boundaries of template declarations Not resolved @@ -16996,17 +16996,17 @@

C++ defect report implementation status

Unclear synchronization requirements for object lifetime rules Not resolved - + 2864 - tentatively ready + DR Narrowing floating-point conversions - Not resolved + Unknown - + 2865 - tentatively ready + DR Regression on result of conditional operator - Not resolved + Unknown 2866 @@ -17014,11 +17014,11 @@

C++ defect report implementation status

Observing the effects of [[no_unique_address]] Not resolved - + 2867 - review + DR Order of initialization for structured bindings - Not resolved + Unknown 2868 @@ -17026,29 +17026,29 @@

C++ defect report implementation status

Self-references in trivially copyable objects as function return values Not resolved - + 2869 - tentatively ready + DR this in local classes - Not resolved + Unknown - + 2870 - tentatively ready + DR Combining absent encoding-prefixes - Not resolved + Unknown - + 2871 - tentatively ready + DR User-declared constructor templates inhibiting default constructors - Not resolved + Unknown - + 2872 - tentatively ready + DR Linkage and unclear "can be referred to" - Not resolved + Unknown 2873 @@ -17056,29 +17056,29 @@

C++ defect report implementation status

Taking the address of a function involving template argument deduction Not resolved - + 2874 - tentatively ready + DR Qualified declarations of partial specializations - Not resolved + Unknown 2875 - tentatively ready + review Missing support for round-tripping null pointer values through indirection/address operators Not resolved - + 2876 - tentatively ready + accepted Disambiguation of T x = delete("text") - Not resolved + Unknown - + 2877 - tentatively ready + DR Type-only lookup for using-enum-declarator - Not Resolved* + Clang 19 2878 @@ -17098,23 +17098,23 @@

C++ defect report implementation status

Accessibility check for destructor of incomplete class type Not resolved - + 2881 - tentatively ready + DR Type restrictions for the explicit object parameter of a lambda - Not Resolved* + Clang 19 - + 2882 - tentatively ready + DR Unclear treatment of conversion to void - Not Resolved* + Clang 2.7 - + 2883 - tentatively ready + DR Definition of "odr-usable" ignores lambda scopes - Not Resolved* + No 2884 @@ -17124,21 +17124,21 @@

C++ defect report implementation status

2885 - tentatively ready + review Non-eligible trivial default constructors Not Resolved* - + 2886 - tentatively ready + DR Temporaries and trivial potentially-throwing special member functions - Not Resolved* + Clang 9 - + 2887 - tentatively ready + DR Missing compatibility entries for xvalues - Not resolved + Unknown 2888 @@ -17158,17 +17158,17 @@

C++ defect report implementation status

Defining members of local classes Not resolved - + 2891 - tentatively ready + DR Normative status of implementation limits - Not resolved + Unknown - + 2892 - tentatively ready + DR Unclear usual arithmetic conversions - Not resolved + Unknown 2893 @@ -17182,11 +17182,11 @@

C++ defect report implementation status

Functional casts create prvalues of reference type Not resolved - + 2895 - tentatively ready + DR Initialization should ignore the destination type's cv-qualification - Not resolved + Unknown 2896 @@ -17235,6 +17235,90 @@

C++ defect report implementation status

tentatively ready Can we omit the template disambiguator in nested-name-specifiers in type-only contexts? Not resolved + + + 2904 + open + Introducing template-names + Not resolved + + + 2905 + tentatively ready + Value-dependence of noexcept-expression + Not resolved + + + 2906 + tentatively ready + Lvalue-to-rvalue conversion of class types for conditional operator + Not resolved + + + 2907 + open + Constant lvalue-to-rvalue conversion on uninitialized std::nullptr_t + Not resolved + + + 2908 + open + Counting physical source lines for __LINE__ + Not resolved + + + 2909 + open + Subtle difference between constant-initialized and constexpr + Not resolved + + + 2910 + open + Effect of requirement-parameter-lists on odr-usability + Not resolved + + + 2911 + open + Unclear meaning of expressions "appearing within" subexpressions + Not resolved + + + 2912 + open + Too-large value for size in array new + Not resolved + + + 2913 + open + Grammar for deduction-guide has requires-clause in the wrong position + Not resolved + + + 2914 + open + Unclear order of initialization of static and thread-local variables + Not resolved + + + 2915 + open + Explicit object parameters of type void + Not resolved + + + 2916 + open + Variable template partial specializations should not be declared static + Not resolved + + + 2917 + open + Disallow multiple friend-type-specifiers for a friend template + Not resolved diff --git a/clang/www/make_cxx_dr_status b/clang/www/make_cxx_dr_status index 1d337fc4e5f87..773f14cfe3199 100755 --- a/clang/www/make_cxx_dr_status +++ b/clang/www/make_cxx_dr_status @@ -142,13 +142,12 @@ availability_error_occurred = False def availability(issue): status = status_map.get(issue, 'unknown') - 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 +245,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)