xref: /llvm-project/clang-tools-extra/docs/clang-tidy/checks/hicpp/signed-bitwise.rst (revision c6fa07ca966eb8902465adbe2c6c1e41a108881c)
1.. title:: clang-tidy - hicpp-signed-bitwise
2
3hicpp-signed-bitwise
4====================
5
6Finds uses of bitwise operations on signed integer types, which may lead to
7undefined or implementation defined behavior.
8
9The according rule is defined in the `High Integrity C++ Standard, Section 5.6.1 <https://www.perforce.com/resources/qac/high-integrity-cpp-coding-standard-expressions>`_.
10
11Options
12-------
13
14.. option:: IgnorePositiveIntegerLiterals
15
16   If this option is set to `true`, the check will not warn on bitwise operations with positive integer literals, e.g. `~0`, `2 << 1`, etc.
17   Default value is `false`.
18