From 114da7238abafc74967c47ead92ac5fa0a380210 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 27 Nov 2024 15:45:29 +0200 Subject: [PATCH] [Clang] replace 'bitfield' with 'bit-field' for consistency --- clang/include/clang/Basic/DiagnosticASTKinds.td | 8 ++++---- clang/include/clang/Basic/DiagnosticSemaKinds.td | 2 +- clang/test/Modules/compare-record.c | 16 ++++++++-------- clang/test/Modules/odr_hash.cpp | 12 ++++++------ 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/clang/include/clang/Basic/DiagnosticASTKinds.td b/clang/include/clang/Basic/DiagnosticASTKinds.td index 6a658cf14356f..f630698757c5f 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 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" diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 6ff24c2bc8faa..11dc8e7e2a26a 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, 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 60998696969e1..ef4a3a5b0e90d 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 different definitions in different modules; first difference 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 different definitions in different modules; first difference 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 different definitions in different modules; first difference 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 different definitions in different modules; first difference 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 different definitions in different modules; first difference is definition in module 'First.Hidden' found bitfield 'bitfieldWidth' with one width expression}} -// expected-note@second.h:* {{but in 'Second' found bitfield 'bitfieldWidth' with different width expression}} +// 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}} +// expected-note@second.h:* {{but in 'Second' found bit-field 'bitfieldWidth' with different width expression}} struct CompareBitfieldWidthExpression compareBitfieldWidthExpression; -// 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}} -// expected-note@second.h:* {{but in 'Second' found bitfield 'bitfieldWidthExpression' with different width expressio}} +// 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}} +// expected-note@second.h:* {{but in 'Second' found bit-field 'bitfieldWidthExpression' with different width expressio}} #endif #if defined(FIRST) diff --git a/clang/test/Modules/odr_hash.cpp b/clang/test/Modules/odr_hash.cpp index fa8b2c81ab46e..f1de6b3d433ed 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 different definitions in different modules; first difference 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 different definitions in different modules; first difference 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 different definitions in different modules; first difference is definition in module 'SecondModule' found bitfield 'x' with one width expression}} -// expected-note@first.h:* {{but in 'FirstModule' found bitfield 'x' with different width expression}} +// 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}} +// expected-note@first.h:* {{but in 'FirstModule' found bit-field 'x' with different width expression}} #endif #if defined(FIRST) @@ -292,8 +292,8 @@ struct S8 { }; #else S8 s8; -// 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}} -// expected-note@first.h:* {{but in 'FirstModule' found bitfield 'x' with different width expression}} +// 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}} +// expected-note@first.h:* {{but in 'FirstModule' found bit-field 'x' with different width expression}} #endif #if defined(FIRST)