return DeclPtrTy::make(Tag);
}
+ if (getLangOptions().CPlusPlus &&
+ DS.getStorageClassSpec() != DeclSpec::SCS_typedef)
+ if (EnumDecl *Enum = dyn_cast_or_null<EnumDecl>(Tag))
+ if (Enum->enumerator_begin() == Enum->enumerator_end() &&
+ !Enum->getIdentifier() && !Enum->isInvalidDecl())
+ Diag(Enum->getLocation(), diag::ext_no_declarators)
+ << DS.getSourceRange();
+
if (!DS.isMissingDeclaratorOk() &&
DS.getTypeSpecType() != DeclSpec::TST_error) {
// Warn about typedefs of enums without names, since this is an
e |= 1; // expected-error{{assigning to 'PR7051::E' from incompatible type 'int'}}
}
}
+
+// PR7466
+enum { }; // expected-warning{{declaration does not declare anything}}
+typedef enum { }; // expected-warning{{typedef requires a name}}