Skip to content

Commit

Permalink
[clang][NFC] Keep the order of DRs in dr23xx.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Endilll committed Feb 15, 2024
1 parent f209352 commit 630548a
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions clang/test/CXX/drs/dr23xx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,39 @@ namespace dr2358 { // dr2358: 16
}
#endif

// CWG2363 was closed as NAD, but its resolution does affirm that
// a friend declaration cannot have an opaque-enumm-specifier.
namespace dr2363 { // dr2363: yes

enum class E0;
enum E1 : int;

struct A {
friend enum class E0;
// since-cxx11-error@-1 {{reference to enumeration must use 'enum' not 'enum class'}}
// expected-error@-2 {{elaborated enum specifier cannot be declared as a friend}}
// expected-note@-3 {{remove 'enum class' to befriend an enum}}

friend enum E0;
// expected-error@-1 {{elaborated enum specifier cannot be declared as a friend}}
// expected-note@-2 {{remove 'enum' to befriend an enum}}

friend enum class E1;
// since-cxx11-error@-1 {{reference to enumeration must use 'enum' not 'enum class'}}
// expected-error@-2 {{elaborated enum specifier cannot be declared as a friend}}
// expected-note@-3 {{remove 'enum class' to befriend an enum}}

friend enum E1;
// expected-error@-1 {{elaborated enum specifier cannot be declared as a friend}}
// expected-note@-2 {{remove 'enum' to befriend an enum}}

friend enum class E2;
// since-cxx11-error@-1 {{reference to enumeration must use 'enum' not 'enum class'}}
// expected-error@-2 {{elaborated enum specifier cannot be declared as a friend}}
// expected-note@-3 {{remove 'enum class' to befriend an enum}}
};
} // namespace dr2363

namespace dr2370 { // dr2370: no
namespace N {
typedef int type;
Expand Down Expand Up @@ -278,37 +311,4 @@ namespace dr2397 { // dr2397: 17
}
} // namespace dr2397

// CWG2363 was closed as NAD, but its resolution does affirm that
// a friend declaration cannot have an opaque-enumm-specifier.
namespace dr2363 { // dr2363: yes

enum class E0;
enum E1 : int;

struct A {
friend enum class E0;
// since-cxx11-error@-1 {{reference to enumeration must use 'enum' not 'enum class'}}
// expected-error@-2 {{elaborated enum specifier cannot be declared as a friend}}
// expected-note@-3 {{remove 'enum class' to befriend an enum}}

friend enum E0;
// expected-error@-1 {{elaborated enum specifier cannot be declared as a friend}}
// expected-note@-2 {{remove 'enum' to befriend an enum}}

friend enum class E1;
// since-cxx11-error@-1 {{reference to enumeration must use 'enum' not 'enum class'}}
// expected-error@-2 {{elaborated enum specifier cannot be declared as a friend}}
// expected-note@-3 {{remove 'enum class' to befriend an enum}}

friend enum E1;
// expected-error@-1 {{elaborated enum specifier cannot be declared as a friend}}
// expected-note@-2 {{remove 'enum' to befriend an enum}}

friend enum class E2;
// since-cxx11-error@-1 {{reference to enumeration must use 'enum' not 'enum class'}}
// expected-error@-2 {{elaborated enum specifier cannot be declared as a friend}}
// expected-note@-3 {{remove 'enum class' to befriend an enum}}
};
} // namespace dr2363

#endif

3 comments on commit 630548a

@dyung
Copy link
Collaborator

@dyung dyung commented on 630548a Feb 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Endilll
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I'll take a look momentarily

@Endilll
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I know what's wrong. I'll commit shortly after local testing

Please sign in to comment.