Structure propagation is applied from an entry point (malloc, ctor) and only goes down into callees. If the entry point function returns the propagated object, it could be interesting to propagate after calls to the function (in the function's callers).
Two cases have to be distinguished:
The entry point function is a ctor, returning *this. We do not want to propagate in the ctor callers, as they can be ctors to derived classes and propagating a base class into a derived ctor is wrong;
The entry point function returns an allocated object (its type is known). Propagation can be continued in callers.
Structure propagation is applied from an entry point (malloc, ctor) and only goes down into callees. If the entry point function returns the propagated object, it could be interesting to propagate after calls to the function (in the function's callers).
Two cases have to be distinguished:
*this
. We do not want to propagate in the ctor callers, as they can be ctors to derived classes and propagating a base class into a derived ctor is wrong;