[clang] [analyzer] Improve handling of unsigned values in ArrayBoundCheckerV2 (PR #81034)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 9 07:43:01 PDT 2024
steakhal wrote:
In this PR, we decided to suppress some reports.
It turns out the `alpha.security.ReturnPtrRange` would overtake some the suppressed reports and issue a diagnostic itself.
Here is an example:
https://compiler-explorer.com/z/P9bGTjv5W
```c++
const char *unwindTerminator(const char *it) {
return (*(it - 1) == '=') ? (it - 1) : it;
}
```
In the past, it was diagnosed by the ArrayBoundV2, but since this PR, it gets suppressed, thus the `ReturnPtrRange` gets the chance to report these. Should we also patch that checker to suppress these reports for the same reason as we suppressed these in the ArrayBoundV2?
@NagyDonat
https://github.com/llvm/llvm-project/pull/81034
More information about the cfe-commits
mailing list