Skip to content

Commit 14c8feb

Browse files
authored
[NFC] [Clang] Some core issues have changed status from tentatively ready -> ready / review (#97200)
Also classes the "ready" status similarly to "tentatively ready" in make_cxx_dr_status
1 parent 3891468 commit 14c8feb

File tree

4 files changed

+304
-171
lines changed

4 files changed

+304
-171
lines changed

clang/test/CXX/drs/cwg25xx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ struct D3 : B {
139139
#endif
140140

141141
#if __cplusplus >= 202302L
142-
namespace cwg2561 { // cwg2561: no tentatively ready 2024-03-18
142+
namespace cwg2561 { // cwg2561: no
143143
struct C {
144144
constexpr C(auto) { }
145145
};

clang/test/CXX/drs/cwg28xx.cpp

Lines changed: 61 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ using U2 = decltype(&main);
3030
#endif
3131
} // namespace cwg2811
3232

33-
namespace cwg2819 { // cwg2819: 19 tentatively ready 2023-12-01
33+
namespace cwg2819 { // cwg2819: 19
3434
#if __cpp_constexpr >= 202306L
3535
constexpr void* p = nullptr;
3636
constexpr int* q = static_cast<int*>(p);
@@ -111,7 +111,7 @@ struct D : N::B {
111111
#endif
112112
} // namespace cwg2857
113113

114-
namespace cwg2858 { // cwg2858: 19 tentatively ready 2024-04-05
114+
namespace cwg2858 { // cwg2858: 19
115115

116116
#if __cplusplus > 202302L
117117

@@ -134,23 +134,23 @@ struct A {
134134

135135
} // namespace cwg2858
136136

137-
namespace cwg2877 { // cwg2877: 19 tentatively ready 2024-05-31
137+
namespace cwg2877 { // cwg2877: 19
138138
#if __cplusplus >= 202002L
139139
enum E { x };
140140
void f() {
141141
int E;
142-
using enum E; // OK, names ::E
142+
using enum E; // OK
143143
}
144144
using F = E;
145-
using enum F; // OK, designates ::E
145+
using enum F; // OK
146146
template<class T> using EE = T;
147147
void g() {
148-
using enum EE<E>; // OK, designates ::E
148+
using enum EE<E>; // OK
149149
}
150150
#endif
151151
} // namespace cwg2877
152152

153-
namespace cwg2881 { // cwg2881: 19 tentatively ready 2024-04-19
153+
namespace cwg2881 { // cwg2881: 19
154154

155155
#if __cplusplus >= 202302L
156156

@@ -216,11 +216,61 @@ void f() {
216216
o.decltype(L2)::operator()();
217217
}
218218

219+
void f2() {
220+
int x = 0;
221+
auto lambda = [x] (this auto self) { return x; };
222+
using Lambda = decltype(lambda);
223+
struct D : private Lambda { // expected-note {{declared private here}}
224+
D(Lambda l) : Lambda(l) {}
225+
using Lambda::operator();
226+
friend Lambda;
227+
} d(lambda);
228+
d(); // expected-error {{must derive publicly from the lambda}}
229+
}
230+
231+
template <typename L>
232+
struct Private : private L {
233+
using L::operator();
234+
Private(L l) : L(l) {}
235+
};
236+
237+
template<typename T>
238+
struct Indirect : T {
239+
using T::operator();
240+
};
241+
242+
template<typename T>
243+
struct Ambiguous : Indirect<T>, T { // expected-warning {{is inaccessible due to ambiguity}}
244+
using Indirect<T>::operator();
245+
};
246+
247+
template <typename L>
248+
constexpr auto f3(L l) -> decltype(Private<L>{l}()) { return l(); }
249+
// expected-note@-1 {{must derive publicly from the lambda}}
250+
251+
template <typename L>
252+
constexpr auto f4(L l) -> decltype(Ambiguous<L>{{l}, l}()) { return l(); }
253+
// expected-note@-1 {{is inaccessible due to ambiguity}}
254+
// expected-note@-2 {{in instantiation of template class}}
255+
256+
template<typename T>
257+
concept is_callable = requires(T t) { { t() }; };
258+
259+
void g() {
260+
int x = 0;
261+
auto lambda = [x](this auto self) {};
262+
f3(lambda); // expected-error {{no matching function for call to 'f3'}}
263+
f4(lambda); // expected-error {{no matching function for call to 'f4'}}
264+
// expected-note@-1 {{while substituting deduced template arguments into function template 'f4'}}
265+
static_assert(!is_callable<Private<decltype(lambda)>>);
266+
static_assert(!is_callable<Ambiguous<decltype(lambda)>>);
267+
}
268+
219269
#endif
220270

221271
} // namespace cwg2881
222272

223-
namespace cwg2882 { // cwg2882: 2.7 tentatively ready 2024-05-31
273+
namespace cwg2882 { // cwg2882: 2.7
224274
struct C {
225275
operator void() = delete;
226276
// expected-warning@-1 {{conversion function converting 'cwg2882::C' to 'void' will never be used}}
@@ -232,7 +282,7 @@ void f(C c) {
232282
}
233283
} // namespace cwg2882
234284

235-
namespace cwg2883 { // cwg2883: no tentatively ready 2024-05-31
285+
namespace cwg2883 { // cwg2883: no
236286
#if __cplusplus >= 201103L
237287
void f() {
238288
int x;
@@ -257,7 +307,7 @@ void g() {
257307
#endif
258308
} // namespace cwg2883
259309

260-
namespace cwg2885 { // cwg2885: 16 tentatively ready 2024-05-31
310+
namespace cwg2885 { // cwg2885: 16 review 2024-05-31
261311
#if __cplusplus >= 202002L
262312
template <class T>
263313
struct A {
@@ -271,7 +321,7 @@ static_assert(!__is_trivially_constructible(B));
271321
#endif
272322
} // namespace cwg2885
273323

274-
namespace cwg2886 { // cwg2886: 9 tentatively ready 2024-05-31
324+
namespace cwg2886 { // cwg2886: 9
275325
#if __cplusplus >= 201103L
276326
struct C {
277327
C() = default;

0 commit comments

Comments
 (0)