[PATCH] D150446: [analyzer] Check ArraySubscriptExprs in ArrayBoundCheckerV2
DonĂ¡t Nagy via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 16 05:22:46 PDT 2023
donat.nagy added a comment.
By the way, I'm fed up with the hack that ElementRegion is used for three separate things ("real" array indexing, casts and pointer arithmetic) and I'm thinking about introducing a subclass hierarchy where a base class `ElementLikeRegion` has three subclasses called `ElementRegion` (represents one element), `CastRegion` (represents the same memory area, but with a different type) and `OffsetRegion` (represents the same memory area, but through different starting point). Most old references to ElementRegion could be replaced by references to ElementLikeRegion, but functions like `stripCasts()` would be able to distinguish between the subclasses and do the intuitive thing.
What do you think about this idea? Do you see any problem with it?
(By the way I'm not satisfied with these quickly picked class names -- feel free to suggest better ones!)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150446/new/
https://reviews.llvm.org/D150446
More information about the cfe-commits
mailing list