rsmith added a comment.

In https://reviews.llvm.org/D45382#1060452, @ahatanak wrote:

> In https://reviews.llvm.org/D45382#1060163, @rjmccall wrote:
>
> > Hmm.  I'm not actually sure *why* it's not okay to forward callee-cleanup 
> > arguments.  Do we just not have the necessary logic to disable the cleanup 
> > in the caller?
>
>
> It seems that it would be OK if there was a way to disable the cleanup in the 
> caller when we know that we are delegating to another constructor, possibly 
> by setting the DelegateCXXConstructorCall here too. But maybe there are other 
> reasons for not doing so.
>
> Perhaps Richard (who committed r274049) knows why we can't call the delegated 
> constructor when there are callee-cleanup arguments?


I think the only reason was that we didn't have a good way to handle cleanup 
emission in the thunk (as @rjmccall points out, we do need parameter cleanups 
in the thunk, but we need to disable them at the point of the call to the 
inherited constructor). I cannot think of any correctness reason that prevents 
using a thunk for the callee-cleanup case.


Repository:
  rC Clang

https://reviews.llvm.org/D45382



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to