PreStmtPurgeDeadSymbols and LazyCompoundVal, bindings

Hello Adam,

1. temp_object (CXXTempObjectRegion) is just an abstract memory piece. But we need to get the value stored in it, not the memory itself. As I understand, your code doesn't uses references performs copying by value. So, LazyCompoundVal becomes the value of this region because it has structure type.

2. LazyCompoundVal contains a reference to the Store where a binding was initiated. So, on the last step LazyCompoundVal still refers to the conjured symbol but in another Store which exists on the step 4. This is done because we may change the fields of the initial structure but LazyCompoundVal should stay the same. So, LazyCompoundVal uses a "freezed" version of Store and we may safely remove dead bindings from the current state.
If you take a Store LazyCompoundVal refers to (LazyCompoundVal::getStore()), you will see a binding. It is not lost.

Anna or Artem, please correct me if I'm wrong.

Hello Aleksei,

If you take a Store LazyCompoundVal refers to (LazyCompoundVal::getStore()), you will see a binding. It is > not lost.

Thank you, now it works!

Regards,

Ádám