Skip to content

Commit 538fafa

Browse files
committed
Disable clang-format for these two
For some weird reason clang-format decided that the `&` operator is an address-of unary-operator and not a bitwise-and binary operator.
1 parent b4683d2 commit 538fafa

File tree

1 file changed

+2
-0
lines changed
  • cpp/misra/test/rules/RULE-10-2-3

1 file changed

+2
-0
lines changed

cpp/misra/test/rules/RULE-10-2-3/test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ void bitwise() {
4949
Fixed f = F0;
5050

5151
u | U1; // NON_COMPLIANT: bitwise on unfixed unscoped enum
52+
// clang-format off
5253
u & U1; // NON_COMPLIANT: bitwise on unfixed unscoped enum
5354
u ^ U1; // NON_COMPLIANT: bitwise on unfixed unscoped enum
5455

@@ -370,6 +371,7 @@ void cross_enum_bitwise() {
370371
Fixed f = F0;
371372

372373
u | f; // NON_COMPLIANT: bitwise with unfixed operand
374+
// clang-format off
373375
u & f; // NON_COMPLIANT: bitwise with unfixed operand
374376
u ^ f; // NON_COMPLIANT: bitwise with unfixed operand
375377
f | u; // NON_COMPLIANT: bitwise with unfixed operand

0 commit comments

Comments
 (0)