-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[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
Conversation
@llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) ChangesFixes #117711 Full diff: https://github.com/llvm/llvm-project/pull/117881.diff 4 Files Affected:
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 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 6ff24c2bc8faad..11dc8e7e2a26a9 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;
-// [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)
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;
-// [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)
@@ -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)
@@ -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)
|
@llvm/pr-subscribers-clang-modules Author: Oleksandr T. (a-tarasyuk) ChangesFixes #117711 Full diff: https://github.com/llvm/llvm-project/pull/117881.diff 4 Files Affected:
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 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 6ff24c2bc8faad..11dc8e7e2a26a9 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;
-// [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)
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;
-// [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)
@@ -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)
@@ -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)
|
@AaronBallman is it ok to skip the release notes for these minor changes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM assuming precommit CI comes back green. No need for a release note as this is just fixing a typo, really.
Fixes #117711