[PATCH] D79330: [Analyzer][VLASizeChecker] Check for VLA size overflow.
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 13 10:17:26 PDT 2020
martong added a comment.
In D79330#2026564 <https://reviews.llvm.org/D79330#2026564>, @balazske wrote:
> I do not know if it would me **much** cleaner.
>
> - First part: Move calculation of `ArraySize` into `checkVLA` and rename `checkVLASize` to `checkVLAIndexSize`.
> - Second part: Add the check for total array size to `checkVLA`. The first part in itself does not make sense necessarily until we see why this change is needed (this is, because the total size is checked and that calculation needs the same data and the total size should be checked both places where `checkVLA` is used). The original code is not much better than after this "part 1" refactoring, computation of `ArraySize` is needed only once not at both places where `checkVLA`is called (but it is needed to implement "part 2").
Alright, makes sense, so let's just disregard the refactoring comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79330/new/
https://reviews.llvm.org/D79330
More information about the cfe-commits
mailing list