[PATCH] D79330: [Analyzer][VLASizeChecker] Check for VLA size overflow.
Balázs Kéri via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 8 00:29:38 PDT 2020
balazske added a comment.
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").
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