[PATCH] D135136: [analyzer] Make directly bounded LazyCompoundVal as lazily copied
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 18 06:13:02 PDT 2022
martong accepted this revision.
martong added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:2843
- // subregions of the `LCS.getRegion()` also lazily copied.
- if (const MemRegion *R = LCS->getRegion())
- SymReaper.markLazilyCopied(R);
----------------
tomasz-kaminski-sonarsource wrote:
> martong wrote:
> > Why can we remove this line?
> > If `LCS->getRegion()` returns a non-null unconditionally then please add an `assert`.
> The interface of the `LazyCompoundVal` is already marked as returning non-null, and this is why we removed the if condition:
> ```
> LLVM_ATTRIBUTE_RETURNS_NONNULL
> const TypedValueRegion *getRegion() const;
> ```
Ok.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135136/new/
https://reviews.llvm.org/D135136
More information about the cfe-commits
mailing list