diff options
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Sema/bitfield.c | 7 | ||||
| -rw-r--r-- | clang/test/SemaCXX/class.cpp | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/clang/test/Sema/bitfield.c b/clang/test/Sema/bitfield.c index f3b285b12ed..2e4df476503 100644 --- a/clang/test/Sema/bitfield.c +++ b/clang/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'}} }; + diff --git a/clang/test/SemaCXX/class.cpp b/clang/test/SemaCXX/class.cpp index 02608faa0f6..08391c9ba1a 100644 --- a/clang/test/SemaCXX/class.cpp +++ b/clang/test/SemaCXX/class.cpp @@ -27,8 +27,8 @@ public: typedef int func(); func tm; func *ptm; - func btm : 1; // expected-error {{error: bit-field 'btm' with non-integral type}} - NestedC bc : 1; // expected-error {{error: bit-field 'bc' with non-integral type}} + func btm : 1; // expected-error {{error: bit-field 'btm' has non-integral type}} + NestedC bc : 1; // expected-error {{error: bit-field 'bc' has non-integral type}} enum E1 { en1, en2 }; |

