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
main
Junio C Hamano 2025-09-18 10:07:01 -07:00
commit c6fa656e2c
1 changed files with 6 additions and 0 deletions

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.