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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits