With -vet-style, give suggestion of separating where clauses with a comma rather than '&&'

This improves the error messages
This commit is contained in:
gingerBill
2024-05-09 15:56:00 +01:00
parent b0f0e4d02a
commit f54977336b
3 changed files with 16 additions and 2 deletions
+1 -1
View File
@@ -1166,7 +1166,7 @@ gb_internal void check_bit_field_type(CheckerContext *ctx, Type *bit_field_type,
}
}
if (all_ones && all_booleans) {
if (build_context.vet_flags & VetFlag_Style) {
if (ast_file_vet_style(ctx->file)) {
char const *msg = "This 'bit_field' is better expressed as a 'bit_set' since all of the fields are booleans, of 1-bit in size, and the backing type is an integer (-vet-style)";
error(node, msg);
} else {