aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/enum.c
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-11-29 23:18:09 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-11-29 23:18:09 +0000
commitbbd340717422bf011d56cd0164d2576601368111 (patch)
treef48622c0c79daa178eca50e4eca4121d1232dcf8 /test/Sema/enum.c
parent8b2f01b56209f4bb7331292225c5300753880044 (diff)
Incomplete enum types not to be treated as integer type
when checking for integer signed/unsigned-ness. PR8694, // rdar://8707031 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120345 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/enum.c')
-rw-r--r--test/Sema/enum.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Sema/enum.c b/test/Sema/enum.c
index d83b06f56b..a95efb035d 100644
--- a/test/Sema/enum.c
+++ b/test/Sema/enum.c
@@ -104,3 +104,16 @@ void PR7911F() {
}
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 *'}}
+}
+