diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-05 22:45:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-05 22:45:59 +0000 |
commit | 247936605913c718f4141f845aec6cb6e169fb37 (patch) | |
tree | 446b6c874793d4aee7fa9edd9b0967e295b56764 /test/Sema/bitfield.c | |
parent | d61a50a84d87a317cf929c6c1babf27d404b1e29 (diff) |
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
Diffstat (limited to 'test/Sema/bitfield.c')
-rw-r--r-- | test/Sema/bitfield.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Sema/bitfield.c b/test/Sema/bitfield.c index f3b285b12e..2e4df47650 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 @@ struct a { // 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'}} }; + |