Author: Oleksandr T. Date: 2024-11-27T17:09:41+02:00 New Revision: f67ba5855278401728413431216dda5d370ac2e0
URL: https://github.com/llvm/llvm-project/commit/f67ba5855278401728413431216dda5d370ac2e0 DIFF: https://github.com/llvm/llvm-project/commit/f67ba5855278401728413431216dda5d370ac2e0.diff LOG: [Clang] replace 'bitfield' with 'bit-field' for consistency (#117881) Fixes #117711 Added: Modified: clang/include/clang/Basic/DiagnosticASTKinds.td clang/include/clang/Basic/DiagnosticSemaKinds.td clang/test/Modules/compare-record.c clang/test/Modules/odr_hash.cpp Removed: ################################################################################ diff --git a/clang/include/clang/Basic/DiagnosticASTKinds.td b/clang/include/clang/Basic/DiagnosticASTKinds.td index 6a658cf14356f5..f630698757c5fb 100644 --- a/clang/include/clang/Basic/DiagnosticASTKinds.td +++ b/clang/include/clang/Basic/DiagnosticASTKinds.td @@ -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" @@ -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 diff erent width expression|" + "%select{non-|}4bit-field %3|" + "bit-field %3 with diff erent width expression|" "%select{non-|}4mutable field %3|" "field %3 with %select{no|an}4 initializer|" "field %3 with a diff erent initializer" diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 3317c4e93199b0..c1cdd811db446d 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -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">, diff --git a/clang/test/Modules/compare-record.c b/clang/test/Modules/compare-record.c index 60998696969e12..ef4a3a5b0e90db 100644 --- a/clang/test/Modules/compare-record.c +++ b/clang/test/Modules/compare-record.c @@ -226,17 +226,17 @@ struct CompareBitfieldWidthExpression { #else struct CompareMatchingBitfields compareMatchingBitfields; struct CompareBitfieldPresence1 compareBitfieldPresence1; -// expected-error@first.h:* {{'CompareBitfieldPresence1' has diff erent definitions in diff erent modules; first diff erence is definition in module 'First.Hidden' found bitfield 'bitfieldPresence1'}} -// expected-note@second.h:* {{but in 'Second' found non-bitfield 'bitfieldPresence1'}} +// expected-error@first.h:* {{'CompareBitfieldPresence1' has diff erent definitions in diff erent modules; first diff erence is definition in module 'First.Hidden' found bit-field 'bitfieldPresence1'}} +// expected-note@second.h:* {{but in 'Second' found non-bit-field 'bitfieldPresence1'}} struct CompareBitfieldPresence2 compareBitfieldPresence2; -// expected-error@first.h:* {{'CompareBitfieldPresence2' has diff erent definitions in diff erent modules; first diff erence is definition in module 'First.Hidden' found non-bitfield 'bitfieldPresence2'}} -// expected-note@second.h:* {{but in 'Second' found bitfield 'bitfieldPresence2'}} +// expected-error@first.h:* {{'CompareBitfieldPresence2' has diff erent definitions in diff erent modules; first diff erence is definition in module 'First.Hidden' found non-bit-field 'bitfieldPresence2'}} +// expected-note@second.h:* {{but in 'Second' found bit-field 'bitfieldPresence2'}} struct CompareBitfieldWidth compareBitfieldWidth; -// expected-error@first.h:* {{'CompareBitfieldWidth' has diff erent definitions in diff erent modules; first diff erence is definition in module 'First.Hidden' found bitfield 'bitfieldWidth' with one width expression}} -// expected-note@second.h:* {{but in 'Second' found bitfield 'bitfieldWidth' with diff erent width expression}} +// expected-error@first.h:* {{'CompareBitfieldWidth' has diff erent definitions in diff erent modules; first diff erence is definition in module 'First.Hidden' found bit-field 'bitfieldWidth' with one width expression}} +// expected-note@second.h:* {{but in 'Second' found bit-field 'bitfieldWidth' with diff erent width expression}} struct CompareBitfieldWidthExpression compareBitfieldWidthExpression; -// expected-error@first.h:* {{'CompareBitfieldWidthExpression' has diff erent definitions in diff erent modules; first diff erence is definition in module 'First.Hidden' found bitfield 'bitfieldWidthExpression' with one width expression}} -// expected-note@second.h:* {{but in 'Second' found bitfield 'bitfieldWidthExpression' with diff erent width expressio}} +// expected-error@first.h:* {{'CompareBitfieldWidthExpression' has diff erent definitions in diff erent modules; first diff erence is definition in module 'First.Hidden' found bit-field 'bitfieldWidthExpression' with one width expression}} +// expected-note@second.h:* {{but in 'Second' found bit-field 'bitfieldWidthExpression' with diff erent width expressio}} #endif #if defined(FIRST) diff --git a/clang/test/Modules/odr_hash.cpp b/clang/test/Modules/odr_hash.cpp index fa8b2c81ab46e1..f1de6b3d433ed7 100644 --- a/clang/test/Modules/odr_hash.cpp +++ b/clang/test/Modules/odr_hash.cpp @@ -264,8 +264,8 @@ struct S6 { }; #else S6 s6; -// expected-error@second.h:* {{'Field::S6' has diff erent definitions in diff erent modules; first diff erence is definition in module 'SecondModule' found bitfield 'x'}} -// expected-note@first.h:* {{but in 'FirstModule' found non-bitfield 'x'}} +// expected-error@second.h:* {{'Field::S6' has diff erent definitions in diff erent modules; first diff erence is definition in module 'SecondModule' found bit-field 'x'}} +// expected-note@first.h:* {{but in 'FirstModule' found non-bit-field 'x'}} #endif #if defined(FIRST) @@ -278,8 +278,8 @@ struct S7 { }; #else S7 s7; -// expected-error@second.h:* {{'Field::S7' has diff erent definitions in diff erent modules; first diff erence is definition in module 'SecondModule' found bitfield 'x' with one width expression}} -// expected-note@first.h:* {{but in 'FirstModule' found bitfield 'x' with diff erent width expression}} +// expected-error@second.h:* {{'Field::S7' has diff erent definitions in diff erent modules; first diff erence is definition in module 'SecondModule' found bit-field 'x' with one width expression}} +// expected-note@first.h:* {{but in 'FirstModule' found bit-field 'x' with diff erent width expression}} #endif #if defined(FIRST) @@ -292,8 +292,8 @@ struct S8 { }; #else S8 s8; -// expected-error@second.h:* {{'Field::S8' has diff erent definitions in diff erent modules; first diff erence is definition in module 'SecondModule' found bitfield 'x' with one width expression}} -// expected-note@first.h:* {{but in 'FirstModule' found bitfield 'x' with diff erent width expression}} +// expected-error@second.h:* {{'Field::S8' has diff erent definitions in diff erent modules; first diff erence is definition in module 'SecondModule' found bit-field 'x' with one width expression}} +// expected-note@first.h:* {{but in 'FirstModule' found bit-field 'x' with diff erent width expression}} #endif #if defined(FIRST) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits