[PATCH] D81061: [Analyzer][VLASizeChecker] Fix problem with zero index assumption.
Balázs Kéri via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 9 01:36:38 PDT 2020
balazske marked 2 inline comments as done.
balazske added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp:130-131
+ // At least check for zero again.
+ // Assume that this is a more exact fact than the previous assumptions
+ // (in checkVLAIndexSize), so report error too.
+ reportBug(VLA_Zero, SizeE, State, C);
----------------
NoQ wrote:
> Why not do the same in `checkVLAIndexSize` then?
The only reason for this is was that at this place the known index value is already computed but not in `checkVLAIndexSize`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81061/new/
https://reviews.llvm.org/D81061
More information about the cfe-commits
mailing list