================
@@ -105,6 +105,68 @@ std::string lifetime_modeling::getRegionName(const
MemRegion *Reg) {
return "the region";
}
+namespace clang::ento::lifetime_modeling {
+
+static SmallVector<const MemRegion *, 4>
+getRegionsFromAggrVal(nonloc::LazyCompoundVal LCV, CheckerContext &C) {
+ SmallVector<const MemRegion *, 4> Reg;
+
+ const TypedValueRegion *LCVRegion = LCV.getRegion();
+ QualType T = LCVRegion->getValueType();
+ MemRegionManager &MemMgr = C.getSValBuilder().getRegionManager();
+ StoreManager &StoreMgr = C.getState()->getStateManager().getStoreManager();
+
+ // FIXME: getAsRecordDecl() also includes unions which need different
+ // handling. Reading a binding for every member of a union may produce
regions
+ // that are not actually live.
+ if (const RecordDecl *RD = T->getAsRecordDecl()) {
----------------
steakhal wrote:
How are array aggregates handled?
https://github.com/llvm/llvm-project/pull/214823
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits