Skip to content

[Clang] replace 'bitfield' with 'bit-field' for consistency #117881

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions clang/include/clang/Basic/DiagnosticASTKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,8 @@ def err_module_odr_violation_field : Error<
"%select{"
"field %4|"
"field %4 with type %5|"
"%select{non-|}5bitfield %4|"
"bitfield %4 with one width expression|"
"%select{non-|}5bit-field %4|"
"bit-field %4 with one width expression|"
"%select{non-|}5mutable field %4|"
"field %4 with %select{no|an}5 initializer|"
"field %4 with an initializer"
Expand All @@ -793,8 +793,8 @@ def note_module_odr_violation_field : Note<
"%select{"
"field %3|"
"field %3 with type %4|"
"%select{non-|}4bitfield %3|"
"bitfield %3 with different width expression|"
"%select{non-|}4bit-field %3|"
"bit-field %3 with different width expression|"
"%select{non-|}4mutable field %3|"
"field %3 with %select{no|an}4 initializer|"
"field %3 with a different initializer"
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/DiagnosticSemaKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -6417,7 +6417,7 @@ def warn_signed_bitfield_enum_conversion : Warning<
"enumerators of %1">,
InGroup<BitFieldEnumConversion>, DefaultIgnore;
def note_change_bitfield_sign : Note<
"consider making the bitfield type %select{unsigned|signed}0">;
"consider making the bit-field type %select{unsigned|signed}0">;

def warn_missing_braces : Warning<
"suggest braces around initialization of subobject">,
Expand Down
16 changes: 8 additions & 8 deletions clang/test/Modules/compare-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,17 +226,17 @@ struct CompareBitfieldWidthExpression {
#else
struct CompareMatchingBitfields compareMatchingBitfields;
struct CompareBitfieldPresence1 compareBitfieldPresence1;
// [email protected]:* {{'CompareBitfieldPresence1' has different definitions in different modules; first difference is definition in module 'First.Hidden' found bitfield 'bitfieldPresence1'}}
// [email protected]:* {{but in 'Second' found non-bitfield 'bitfieldPresence1'}}
// [email protected]:* {{'CompareBitfieldPresence1' has different definitions in different modules; first difference is definition in module 'First.Hidden' found bit-field 'bitfieldPresence1'}}
// [email protected]:* {{but in 'Second' found non-bit-field 'bitfieldPresence1'}}
struct CompareBitfieldPresence2 compareBitfieldPresence2;
// [email protected]:* {{'CompareBitfieldPresence2' has different definitions in different modules; first difference is definition in module 'First.Hidden' found non-bitfield 'bitfieldPresence2'}}
// [email protected]:* {{but in 'Second' found bitfield 'bitfieldPresence2'}}
// [email protected]:* {{'CompareBitfieldPresence2' has different definitions in different modules; first difference is definition in module 'First.Hidden' found non-bit-field 'bitfieldPresence2'}}
// [email protected]:* {{but in 'Second' found bit-field 'bitfieldPresence2'}}
struct CompareBitfieldWidth compareBitfieldWidth;
// [email protected]:* {{'CompareBitfieldWidth' has different definitions in different modules; first difference is definition in module 'First.Hidden' found bitfield 'bitfieldWidth' with one width expression}}
// [email protected]:* {{but in 'Second' found bitfield 'bitfieldWidth' with different width expression}}
// [email protected]:* {{'CompareBitfieldWidth' has different definitions in different modules; first difference is definition in module 'First.Hidden' found bit-field 'bitfieldWidth' with one width expression}}
// [email protected]:* {{but in 'Second' found bit-field 'bitfieldWidth' with different width expression}}
struct CompareBitfieldWidthExpression compareBitfieldWidthExpression;
// [email protected]:* {{'CompareBitfieldWidthExpression' has different definitions in different modules; first difference is definition in module 'First.Hidden' found bitfield 'bitfieldWidthExpression' with one width expression}}
// [email protected]:* {{but in 'Second' found bitfield 'bitfieldWidthExpression' with different width expressio}}
// [email protected]:* {{'CompareBitfieldWidthExpression' has different definitions in different modules; first difference is definition in module 'First.Hidden' found bit-field 'bitfieldWidthExpression' with one width expression}}
// [email protected]:* {{but in 'Second' found bit-field 'bitfieldWidthExpression' with different width expressio}}
#endif

#if defined(FIRST)
Expand Down
12 changes: 6 additions & 6 deletions clang/test/Modules/odr_hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ struct S6 {
};
#else
S6 s6;
// [email protected]:* {{'Field::S6' has different definitions in different modules; first difference is definition in module 'SecondModule' found bitfield 'x'}}
// [email protected]:* {{but in 'FirstModule' found non-bitfield 'x'}}
// [email protected]:* {{'Field::S6' has different definitions in different modules; first difference is definition in module 'SecondModule' found bit-field 'x'}}
// [email protected]:* {{but in 'FirstModule' found non-bit-field 'x'}}
#endif

#if defined(FIRST)
Expand All @@ -278,8 +278,8 @@ struct S7 {
};
#else
S7 s7;
// [email protected]:* {{'Field::S7' has different definitions in different modules; first difference is definition in module 'SecondModule' found bitfield 'x' with one width expression}}
// [email protected]:* {{but in 'FirstModule' found bitfield 'x' with different width expression}}
// [email protected]:* {{'Field::S7' has different definitions in different modules; first difference is definition in module 'SecondModule' found bit-field 'x' with one width expression}}
// [email protected]:* {{but in 'FirstModule' found bit-field 'x' with different width expression}}
#endif

#if defined(FIRST)
Expand All @@ -292,8 +292,8 @@ struct S8 {
};
#else
S8 s8;
// [email protected]:* {{'Field::S8' has different definitions in different modules; first difference is definition in module 'SecondModule' found bitfield 'x' with one width expression}}
// [email protected]:* {{but in 'FirstModule' found bitfield 'x' with different width expression}}
// [email protected]:* {{'Field::S8' has different definitions in different modules; first difference is definition in module 'SecondModule' found bit-field 'x' with one width expression}}
// [email protected]:* {{but in 'FirstModule' found bit-field 'x' with different width expression}}
#endif

#if defined(FIRST)
Expand Down