VerifyBitField must be called if we are to form a bitfield FieldDecl.
We will not verify the bitfield if the decl is known to be malformed in
other ways; pretend that we don't have a bitfield if this happens.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235816
91177308-0d34-0410-b5e6-
96231b3b80d8
InvalidDecl = true;
bool ZeroWidth = false;
+ if (InvalidDecl)
+ BitWidth = nullptr;
// If this is declared as a bit-field, check the bit-field.
- if (!InvalidDecl && BitWidth) {
+ if (BitWidth) {
BitWidth = VerifyBitField(Loc, II, T, Record->isMsStruct(Context), BitWidth,
&ZeroWidth).get();
if (!BitWidth) {
typedef __typeof__(+(t5.n++)) Unsigned; // Post-increment is underspecified, but seems to
typedef __typeof__(+(t5.n--)) Unsigned; // also act like compound-assignment.
+
+struct Test6 {
+ : 0.0; // expected-error{{type name requires a specifier or qualifier}}
+};