On Mon, 5 Aug 2019, Martin Liška wrote:
I'm sending fix for the ICE. The issue is that we can end up with a ctor without an argument (when not being used).
Ah, I didn't realize that after cloning and drastically changing the signature it would still count as operator new/delete. Is getting down to 0 arguments the only bad thing that can happen? Can't we have an operator delete (void*, void*) where the first argument gets optimized out and we end up optimizing as if the second argument was actually the memory being released? Should we do some sanity-checking when propagating the new/delete flags to clones?
-- Marc Glisse