From 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 20 Feb 2011 13:06:31 +0000 Subject: Vendor import of clang trunk r126079: http://llvm.org/svn/llvm-project/cfe/trunk@126079 --- test/Sema/enum.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test/Sema/enum.c') 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 *'}} +} + -- cgit v1.1