fix PR3607 and a fixme, by checking bitfield constraints
more consistently.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66210 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/bitfield.c b/test/Sema/bitfield.c
index f3b285b..2e4df47 100644
--- a/test/Sema/bitfield.c
+++ b/test/Sema/bitfield.c
@@ -1,4 +1,5 @@
// RUN: clang %s -fsyntax-only -verify
+enum e0;
struct a {
int a : -1; // expected-error{{bit-field 'a' has negative width}}
@@ -11,4 +12,10 @@
// rdar://6138816
int e : 0; // expected-error {{bit-field 'e' has zero width}}
+
+ float xx : 4; // expected-error {{bit-field 'xx' has non-integral type}}
+
+ // PR3607
+ enum e0 f : 1; // expected-error {{field has incomplete type 'enum e0'}}
};
+