| // RUN: %clang_cc1 -fsyntax-only -pedantic -std=c++11 -verify -triple x86_64-apple-darwin %s |
| enum E : 1; // expected-error{{anonymous bit-field}} |
| enum E : Z; // expected-error{{invalid underlying type}} |
| enum E : int(2); // expected-error{{anonymous bit-field}} |
| enum E : Z(); // expected-error{{anonymous bit-field}} expected-error{{integral constant expression must have integral or unscoped enumeration type, not 'Z'}} |
| enum WithUnderlying : unsigned { wu_value }; |
| struct WithUnderlyingBitfield { |
| int want_unsigned(unsigned); |
| int want_unsigned(int) = delete; |
| int check_enum_bitfield_promotes_correctly = want_unsigned(wu.wu); |