diff options
Diffstat (limited to 'test/Sema/enum.c')
-rw-r--r-- | test/Sema/enum.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Sema/enum.c b/test/Sema/enum.c index 64aa31b..a95efb0 100644 --- a/test/Sema/enum.c +++ b/test/Sema/enum.c @@ -102,3 +102,18 @@ extern enum PR7911T PR7911V; // expected-warning{{ISO C forbids forward referenc void PR7911F() { switch (PR7911V); // expected-error {{statement requires expression of integer type}} } + +char test5[__has_feature(enumerator_attributes) ? 1 : -1]; + +// PR8694 +// rdar://8707031 +void PR8694(int* e) // expected-note {{passing argument to parameter 'e' here}} +{ +} + +void crash(enum E* e) // expected-warning {{declaration of 'enum E' will not be visible outside of this function}} \ + // expected-warning {{ISO C forbids forward references to 'enum' types}} +{ + PR8694(e); // expected-warning {{incompatible pointer types passing 'enum E *' to parameter of type 'int *'}} +} + |