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:
@@ -650,6 +650,12 @@ For C programs:
|
|||||||
cases. However, it is recommended to find a more descriptive name wherever
|
cases. However, it is recommended to find a more descriptive name wherever
|
||||||
possible to improve the readability and maintainability of the code.
|
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:
|
For Perl programs:
|
||||||
|
|
||||||
- Most of the C guidelines above apply.
|
- Most of the C guidelines above apply.
|
||||||
|
|||||||
Reference in New Issue
Block a user