[PATCH] D99714: [clang][Analyzer] Handle flexible arrays better in ArrayBoundV2 checker.
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 1 06:31:01 PDT 2021
martong added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp:117
+namespace {
+SVal getDynamicSizeWithOffset(ProgramStateRef State, const MemRegion *MRegion) {
+ SValBuilder &SvalBuilder = State->getStateManager().getSValBuilder();
----------------
balazske wrote:
> martong wrote:
> > Do we need an overload perhaps in `DynamicSize.h` of
> > ```
> > SVal getDynamicSizeWithOffset(ProgramStateRef State, const SVal &BufV)
> > ```
> > that takes a MemRegion?
> If the change is accepted then yes, or have only the `MemRegion` version.
I think this is the other way around, let's create the overload then we accept.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99714/new/
https://reviews.llvm.org/D99714
More information about the cfe-commits
mailing list