summaryrefslogtreecommitdiff
path: root/test/Sema/enum.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/enum.c')
-rw-r--r--test/Sema/enum.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Sema/enum.c b/test/Sema/enum.c
index 3546bfe48fc6d..f9e40690c6a6d 100644
--- a/test/Sema/enum.c
+++ b/test/Sema/enum.c
@@ -123,3 +123,15 @@ int NegativeShortTest[NegativeShort == -1 ? 1 : -1];
// PR24610
enum Color { Red, Green, Blue }; // expected-note{{previous use is here}}
typedef struct Color NewColor; // expected-error {{use of 'Color' with tag type that does not match previous declaration}}
+
+// PR28903
+// In C it is valid to define tags inside enums.
+struct PR28903 {
+ enum {
+ PR28903_A = (enum {
+ PR28903_B,
+ PR28903_C = PR28903_B
+ })0
+ };
+ int makeStructNonEmpty;
+};