summaryrefslogtreecommitdiff
path: root/test/Sema/enum.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
commitbca07a4524feb4edec581062d631a13116320a24 (patch)
treea9243275843fbeaa590afc07ee888e006b8d54ea /test/Sema/enum.c
parent998bc5802ecdd65ce3b270f6c69a8ae8557f0a10 (diff)
Notes
Diffstat (limited to 'test/Sema/enum.c')
-rw-r--r--test/Sema/enum.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Sema/enum.c b/test/Sema/enum.c
index 64aa31bc4b6f3..a95efb035db1b 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 *'}}
+}
+