def err_field_declared_as_function : Error<"field %0 declared as a function">;
def err_field_incomplete : Error<"field has incomplete type %0">;
def ext_variable_sized_type_in_struct : ExtWarn<
- "field of variable sized type %0 not at the end of a struct or class is a "
- "GNU extension">;
+ "field %0 with variable sized type %1 not at the end of a struct or class is"
+ " a GNU extension">;
def err_flexible_array_empty_struct : Error<
"flexible array %0 not allowed in otherwise empty struct">;
// structures.
if (i != NumFields-1)
Diag(FD->getLocation(), diag::ext_variable_sized_type_in_struct)
- << FD->getDeclName();
+ << FD->getDeclName() << FD->getType();
else {
// We support flexible arrays at the end of structs in
// other structs as an extension.
char tag_data[];
};
struct datatag {
- struct pppoe_tag hdr; //expected-warning{{field of variable sized type 'hdr' not at the end of a struct or class is a GNU extension}}
+ struct pppoe_tag hdr; //expected-warning{{field 'hdr' with variable sized type 'struct pppoe_tag' not at the end of a struct or class is a GNU extension}}
char data;
};