summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/enum.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/enum.cpp')
-rw-r--r--test/SemaCXX/enum.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/SemaCXX/enum.cpp b/test/SemaCXX/enum.cpp
index bfb5784..0690ead 100644
--- a/test/SemaCXX/enum.cpp
+++ b/test/SemaCXX/enum.cpp
@@ -1,9 +1,11 @@
// RUN: %clang_cc1 -fsyntax-only -pedantic -std=c++98 -verify -triple x86_64-apple-darwin %s
-enum E {
+enum E { // expected-note{{previous definition is here}}
Val1,
Val2
};
+enum E; // expected-warning{{redeclaration of already-defined enum 'E' is a GNU extension}}
+
int& enumerator_type(int);
float& enumerator_type(E);
@@ -79,3 +81,7 @@ namespace PR7051 {
e |= 1; // expected-error{{assigning to 'PR7051::E' from incompatible type 'int'}}
}
}
+
+// PR7466
+enum { }; // expected-warning{{declaration does not declare anything}}
+typedef enum { }; // expected-warning{{typedef requires a name}}
OpenPOWER on IntegriCloud