Skip to content

Commit 53bd509

Browse files
committed
Change docs
1 parent 5d37107 commit 53bd509

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang-tools-extra/docs/clang-tidy/checks/performance/bool-bitwise-operation.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ to implicit integer conversions and missed short-circuit evaluation.
1313
.. code-block:: c++
1414

1515
bool invalid = false;
16-
invalid |= x > limit.x; // warning: use logical operator instead of bitwise one for bool
17-
invalid |= y > limit.y; // warning: use logical operator instead of bitwise one for bool
18-
invalid |= z > limit.z; // warning: use logical operator instead of bitwise one for bool
16+
invalid |= x > limit.x; // warning: use logical operator '||' for boolean variable 'invalid' instead of bitwise operator '|='
17+
invalid |= y > limit.y; // warning: use logical operator '||' for boolean variable 'invalid' instead of bitwise operator '|='
18+
invalid |= z > limit.z; // warning: use logical operator '||' for boolean variable 'invalid' instead of bitwise operator '|='
1919
if (invalid) {
2020
// error handling
2121
}

0 commit comments

Comments
 (0)