Skip to content

Commit c6fa656

Browse files
committed
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
2 parents d29cbbb + 929b1d0 commit c6fa656

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Documentation/CodingGuidelines

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,12 @@ For C programs:
650650
cases. However, it is recommended to find a more descriptive name wherever
651651
possible to improve the readability and maintainability of the code.
652652

653+
- Bit fields should be defined without a space around the colon. E.g.
654+
655+
unsigned my_field:1;
656+
unsigned other_field:1;
657+
unsigned field_with_longer_name:1;
658+
653659
For Perl programs:
654660

655661
- Most of the C guidelines above apply.

0 commit comments

Comments
 (0)