Skip to content

Commit f67ba58

Browse files
authored
[Clang] replace 'bitfield' with 'bit-field' for consistency (#117881)
Fixes #117711
1 parent 198fb5e commit f67ba58

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

clang/include/clang/Basic/DiagnosticASTKinds.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -782,8 +782,8 @@ def err_module_odr_violation_field : Error<
782782
"%select{"
783783
"field %4|"
784784
"field %4 with type %5|"
785-
"%select{non-|}5bitfield %4|"
786-
"bitfield %4 with one width expression|"
785+
"%select{non-|}5bit-field %4|"
786+
"bit-field %4 with one width expression|"
787787
"%select{non-|}5mutable field %4|"
788788
"field %4 with %select{no|an}5 initializer|"
789789
"field %4 with an initializer"
@@ -793,8 +793,8 @@ def note_module_odr_violation_field : Note<
793793
"%select{"
794794
"field %3|"
795795
"field %3 with type %4|"
796-
"%select{non-|}4bitfield %3|"
797-
"bitfield %3 with different width expression|"
796+
"%select{non-|}4bit-field %3|"
797+
"bit-field %3 with different width expression|"
798798
"%select{non-|}4mutable field %3|"
799799
"field %3 with %select{no|an}4 initializer|"
800800
"field %3 with a different initializer"

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6417,7 +6417,7 @@ def warn_signed_bitfield_enum_conversion : Warning<
64176417
"enumerators of %1">,
64186418
InGroup<BitFieldEnumConversion>, DefaultIgnore;
64196419
def note_change_bitfield_sign : Note<
6420-
"consider making the bitfield type %select{unsigned|signed}0">;
6420+
"consider making the bit-field type %select{unsigned|signed}0">;
64216421

64226422
def warn_missing_braces : Warning<
64236423
"suggest braces around initialization of subobject">,

clang/test/Modules/compare-record.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,17 +226,17 @@ struct CompareBitfieldWidthExpression {
226226
#else
227227
struct CompareMatchingBitfields compareMatchingBitfields;
228228
struct CompareBitfieldPresence1 compareBitfieldPresence1;
229-
// expected-error@first.h:* {{'CompareBitfieldPresence1' has different definitions in different modules; first difference is definition in module 'First.Hidden' found bitfield 'bitfieldPresence1'}}
230-
// expected-note@second.h:* {{but in 'Second' found non-bitfield 'bitfieldPresence1'}}
229+
// expected-error@first.h:* {{'CompareBitfieldPresence1' has different definitions in different modules; first difference is definition in module 'First.Hidden' found bit-field 'bitfieldPresence1'}}
230+
// expected-note@second.h:* {{but in 'Second' found non-bit-field 'bitfieldPresence1'}}
231231
struct CompareBitfieldPresence2 compareBitfieldPresence2;
232-
// expected-error@first.h:* {{'CompareBitfieldPresence2' has different definitions in different modules; first difference is definition in module 'First.Hidden' found non-bitfield 'bitfieldPresence2'}}
233-
// expected-note@second.h:* {{but in 'Second' found bitfield 'bitfieldPresence2'}}
232+
// expected-error@first.h:* {{'CompareBitfieldPresence2' has different definitions in different modules; first difference is definition in module 'First.Hidden' found non-bit-field 'bitfieldPresence2'}}
233+
// expected-note@second.h:* {{but in 'Second' found bit-field 'bitfieldPresence2'}}
234234
struct CompareBitfieldWidth compareBitfieldWidth;
235-
// expected-error@first.h:* {{'CompareBitfieldWidth' has different definitions in different modules; first difference is definition in module 'First.Hidden' found bitfield 'bitfieldWidth' with one width expression}}
236-
// expected-note@second.h:* {{but in 'Second' found bitfield 'bitfieldWidth' with different width expression}}
235+
// expected-error@first.h:* {{'CompareBitfieldWidth' has different definitions in different modules; first difference is definition in module 'First.Hidden' found bit-field 'bitfieldWidth' with one width expression}}
236+
// expected-note@second.h:* {{but in 'Second' found bit-field 'bitfieldWidth' with different width expression}}
237237
struct CompareBitfieldWidthExpression compareBitfieldWidthExpression;
238-
// expected-error@first.h:* {{'CompareBitfieldWidthExpression' has different definitions in different modules; first difference is definition in module 'First.Hidden' found bitfield 'bitfieldWidthExpression' with one width expression}}
239-
// expected-note@second.h:* {{but in 'Second' found bitfield 'bitfieldWidthExpression' with different width expressio}}
238+
// expected-error@first.h:* {{'CompareBitfieldWidthExpression' has different definitions in different modules; first difference is definition in module 'First.Hidden' found bit-field 'bitfieldWidthExpression' with one width expression}}
239+
// expected-note@second.h:* {{but in 'Second' found bit-field 'bitfieldWidthExpression' with different width expressio}}
240240
#endif
241241

242242
#if defined(FIRST)

clang/test/Modules/odr_hash.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ struct S6 {
264264
};
265265
#else
266266
S6 s6;
267-
// expected-error@second.h:* {{'Field::S6' has different definitions in different modules; first difference is definition in module 'SecondModule' found bitfield 'x'}}
268-
// expected-note@first.h:* {{but in 'FirstModule' found non-bitfield 'x'}}
267+
// expected-error@second.h:* {{'Field::S6' has different definitions in different modules; first difference is definition in module 'SecondModule' found bit-field 'x'}}
268+
// expected-note@first.h:* {{but in 'FirstModule' found non-bit-field 'x'}}
269269
#endif
270270

271271
#if defined(FIRST)
@@ -278,8 +278,8 @@ struct S7 {
278278
};
279279
#else
280280
S7 s7;
281-
// expected-error@second.h:* {{'Field::S7' has different definitions in different modules; first difference is definition in module 'SecondModule' found bitfield 'x' with one width expression}}
282-
// expected-note@first.h:* {{but in 'FirstModule' found bitfield 'x' with different width expression}}
281+
// expected-error@second.h:* {{'Field::S7' has different definitions in different modules; first difference is definition in module 'SecondModule' found bit-field 'x' with one width expression}}
282+
// expected-note@first.h:* {{but in 'FirstModule' found bit-field 'x' with different width expression}}
283283
#endif
284284

285285
#if defined(FIRST)
@@ -292,8 +292,8 @@ struct S8 {
292292
};
293293
#else
294294
S8 s8;
295-
// expected-error@second.h:* {{'Field::S8' has different definitions in different modules; first difference is definition in module 'SecondModule' found bitfield 'x' with one width expression}}
296-
// expected-note@first.h:* {{but in 'FirstModule' found bitfield 'x' with different width expression}}
295+
// expected-error@second.h:* {{'Field::S8' has different definitions in different modules; first difference is definition in module 'SecondModule' found bit-field 'x' with one width expression}}
296+
// expected-note@first.h:* {{but in 'FirstModule' found bit-field 'x' with different width expression}}
297297
#endif
298298

299299
#if defined(FIRST)

0 commit comments

Comments
 (0)