[clang] [analyzer] Switch to PostStmt callbacks in ArrayBoundV2 (PR #72107)

via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 24 10:11:19 PST 2023


=?utf-8?q?Donát?= Nagy <donat.nagy at ericsson.com>,
=?utf-8?q?Donát?= Nagy <donat.nagy at ericsson.com>,
=?utf-8?q?Donát?= Nagy <donat.nagy at ericsson.com>,
=?utf-8?q?Donát?= Nagy <donat.nagy at ericsson.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/72107 at github.com>


DonatNagyE wrote:

I updated the PR to allow `&array[size]` for creating the after-the-end pointer of an array. My implementation interprets this corner case narrowly to limit the amount of false negatives: for example `if (idx >= size) return &array[idx];` is reported as an overflow instead of very optimistically assuming that `idx` must be equal to `size`. 

https://github.com/llvm/llvm-project/pull/72107


More information about the cfe-commits mailing list