diff options
| author | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-27 18:15:02 -0600 |
|---|---|---|
| committer | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-27 18:15:02 -0600 |
| commit | b5bb63d4760f6f6e0282fc9f7eec36b41705458c (patch) | |
| tree | ffbcf2c499c3c64207da0abcee090b1b6b5cf154 | |
| parent | bf1d472621c76875f3c2167064cb924dcd373abb (diff) | |
| download | ztop-b5bb63d4760f6f6e0282fc9f7eec36b41705458c.tar.gz | |
tidy: switch off bugprone-signed-bitwise
LLVM 23's version of the check reports unsigned operands, not just signed
ones: '\''unsigned b = a >> 2;'\'' and '\''p[0] = (unsigned char)(len >> 8);'\''
both warn, which is what the 22 findings in this tree were about. Left
on it would mean either a NOLINT on every big-endian read or casts that
change nothing, so it goes off with the demonstration written beside it,
as the config asks. What is left after that is the five findings the
project already carries: four atoi() calls on COLUMNS and LINES and the
analyzer false positive at the region[] guard.
| -rw-r--r-- | .clang-tidy | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/.clang-tidy b/.clang-tidy index 33455bc..9540023 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -54,6 +54,7 @@ Checks: > -readability-function-size, -readability-inconsistent-declaration-parameter-name, -bugprone-implicit-widening-of-multiplication-result, + -bugprone-signed-bitwise, -performance-no-int-to-ptr # Not enabled, on purpose: @@ -80,6 +81,13 @@ Checks: > # readability-magic-numbers, readability-identifier-length # (noise in a parser and a bit-twiddling arithmetic # scanner) +# bugprone-signed-bitwise +# (LLVM 23 flags unsigned operands: it reports +# `unsigned b = a >> 2;` and `p[0] = (unsigned +# char)(len >> 8);`, so it says nothing about +# signedness here. Reading a big-endian field is +# memcpy plus an explicit shift, which the check +# does not improve.) WarningsAsErrors: '' HeaderFilterRegex: "^(.*/)?(src|tui)/.*\\.h$" |
