diff options
Diffstat (limited to 'test/SemaCXX/enum-scoped.cpp')
-rw-r--r-- | test/SemaCXX/enum-scoped.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/SemaCXX/enum-scoped.cpp b/test/SemaCXX/enum-scoped.cpp index b4aad18b..1eed228 100644 --- a/test/SemaCXX/enum-scoped.cpp +++ b/test/SemaCXX/enum-scoped.cpp @@ -78,22 +78,22 @@ Complete2 complete2; // All the redeclarations below are done twice on purpose. Tests that the type // of the declaration isn't changed. -enum class Redeclare2; // expected-note{{previous use is here}} expected-note{{previous use is here}} +enum class Redeclare2; // expected-note{{previous declaration is here}} expected-note{{previous declaration is here}} enum Redeclare2; // expected-error{{previously declared as scoped}} enum Redeclare2; // expected-error{{previously declared as scoped}} -enum Redeclare3 : int; // expected-note{{previous use is here}} expected-note{{previous use is here}} +enum Redeclare3 : int; // expected-note{{previous declaration is here}} expected-note{{previous declaration is here}} enum Redeclare3; // expected-error{{previously declared with fixed underlying type}} enum Redeclare3; // expected-error{{previously declared with fixed underlying type}} enum class Redeclare5; enum class Redeclare5 : int; // ok -enum Redeclare6 : int; // expected-note{{previous use is here}} expected-note{{previous use is here}} +enum Redeclare6 : int; // expected-note{{previous declaration is here}} expected-note{{previous declaration is here}} enum Redeclare6 : short; // expected-error{{redeclared with different underlying type}} enum Redeclare6 : short; // expected-error{{redeclared with different underlying type}} -enum class Redeclare7; // expected-note{{previous use is here}} expected-note{{previous use is here}} +enum class Redeclare7; // expected-note{{previous declaration is here}} expected-note{{previous declaration is here}} enum class Redeclare7 : short; // expected-error{{redeclared with different underlying type}} enum class Redeclare7 : short; // expected-error{{redeclared with different underlying type}} @@ -272,6 +272,11 @@ namespace PR16900 { A f(A a) { return -a; } // expected-error {{invalid argument type 'PR16900::A' to unary expression}} } +namespace PR18551 { + enum class A { A }; + bool f() { return !A::A; } // expected-error {{invalid argument type 'PR18551::A' to unary expression}} +} + namespace rdar15124329 { enum class B : bool { F, T }; |