[analyzer] Make directly bounded LazyCompoundVal as lazily copied
authorTomasz Kamiński <tomasz.kamiński@sonarsource.com>
Wed, 19 Oct 2022 09:38:21 +0000 (11:38 +0200)
committerTomasz Kamiński <tomasz.kamiński@sonarsource.com>
Wed, 19 Oct 2022 14:06:32 +0000 (16:06 +0200)
commit6194229c6287fa5d8a9a30aa489bcbb8a9754ae0
tree6ff2f5fa0781cbd40219259380065ed557c56159
parenta6b42040ad30c13474c06d3e0291a4675475fec3
[analyzer] Make directly bounded LazyCompoundVal as lazily copied

Previously, `LazyCompoundVal` bindings to subregions referred by
`LazyCopoundVals`, were not marked as //lazily copied//.

This change returns `LazyCompoundVals` from `getInterestingValues()`,
so their regions can be marked as //lazily copied// in `RemoveDeadBindingsWorker::VisitBinding()`.

Depends on D134947

Authored by: Tomasz Kamiński <tomasz.kamiński@sonarsource.com>

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D135136
clang/lib/StaticAnalyzer/Core/RegionStore.cpp
clang/test/Analysis/trivial-copy-struct.cpp