Skip to content

Commit 630548a

Browse files
committed
[clang][NFC] Keep the order of DRs in dr23xx.cpp
1 parent f209352 commit 630548a

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

clang/test/CXX/drs/dr23xx.cpp

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,39 @@ namespace dr2358 { // dr2358: 16
183183
}
184184
#endif
185185

186+
// CWG2363 was closed as NAD, but its resolution does affirm that
187+
// a friend declaration cannot have an opaque-enumm-specifier.
188+
namespace dr2363 { // dr2363: yes
189+
190+
enum class E0;
191+
enum E1 : int;
192+
193+
struct A {
194+
friend enum class E0;
195+
// since-cxx11-error@-1 {{reference to enumeration must use 'enum' not 'enum class'}}
196+
// expected-error@-2 {{elaborated enum specifier cannot be declared as a friend}}
197+
// expected-note@-3 {{remove 'enum class' to befriend an enum}}
198+
199+
friend enum E0;
200+
// expected-error@-1 {{elaborated enum specifier cannot be declared as a friend}}
201+
// expected-note@-2 {{remove 'enum' to befriend an enum}}
202+
203+
friend enum class E1;
204+
// since-cxx11-error@-1 {{reference to enumeration must use 'enum' not 'enum class'}}
205+
// expected-error@-2 {{elaborated enum specifier cannot be declared as a friend}}
206+
// expected-note@-3 {{remove 'enum class' to befriend an enum}}
207+
208+
friend enum E1;
209+
// expected-error@-1 {{elaborated enum specifier cannot be declared as a friend}}
210+
// expected-note@-2 {{remove 'enum' to befriend an enum}}
211+
212+
friend enum class E2;
213+
// since-cxx11-error@-1 {{reference to enumeration must use 'enum' not 'enum class'}}
214+
// expected-error@-2 {{elaborated enum specifier cannot be declared as a friend}}
215+
// expected-note@-3 {{remove 'enum class' to befriend an enum}}
216+
};
217+
} // namespace dr2363
218+
186219
namespace dr2370 { // dr2370: no
187220
namespace N {
188221
typedef int type;
@@ -278,37 +311,4 @@ namespace dr2397 { // dr2397: 17
278311
}
279312
} // namespace dr2397
280313

281-
// CWG2363 was closed as NAD, but its resolution does affirm that
282-
// a friend declaration cannot have an opaque-enumm-specifier.
283-
namespace dr2363 { // dr2363: yes
284-
285-
enum class E0;
286-
enum E1 : int;
287-
288-
struct A {
289-
friend enum class E0;
290-
// since-cxx11-error@-1 {{reference to enumeration must use 'enum' not 'enum class'}}
291-
// expected-error@-2 {{elaborated enum specifier cannot be declared as a friend}}
292-
// expected-note@-3 {{remove 'enum class' to befriend an enum}}
293-
294-
friend enum E0;
295-
// expected-error@-1 {{elaborated enum specifier cannot be declared as a friend}}
296-
// expected-note@-2 {{remove 'enum' to befriend an enum}}
297-
298-
friend enum class E1;
299-
// since-cxx11-error@-1 {{reference to enumeration must use 'enum' not 'enum class'}}
300-
// expected-error@-2 {{elaborated enum specifier cannot be declared as a friend}}
301-
// expected-note@-3 {{remove 'enum class' to befriend an enum}}
302-
303-
friend enum E1;
304-
// expected-error@-1 {{elaborated enum specifier cannot be declared as a friend}}
305-
// expected-note@-2 {{remove 'enum' to befriend an enum}}
306-
307-
friend enum class E2;
308-
// since-cxx11-error@-1 {{reference to enumeration must use 'enum' not 'enum class'}}
309-
// expected-error@-2 {{elaborated enum specifier cannot be declared as a friend}}
310-
// expected-note@-3 {{remove 'enum class' to befriend an enum}}
311-
};
312-
} // namespace dr2363
313-
314314
#endif

0 commit comments

Comments
 (0)