Merge branch 'kn/clang-format-bitfields'

CodingGuidelines now spells out how bitfields are to be written.

* kn/clang-format-bitfields:
  Documentation: note styling for bit fields
This commit is contained in:
Junio C Hamano
2025-09-18 10:07:01 -07:00

View File

@@ -650,6 +650,12 @@ For C programs:
cases. However, it is recommended to find a more descriptive name wherever
possible to improve the readability and maintainability of the code.
- Bit fields should be defined without a space around the colon. E.g.
unsigned my_field:1;
unsigned other_field:1;
unsigned field_with_longer_name:1;
For Perl programs:
- Most of the C guidelines above apply.