fhahn wrote:

Just rebased the PR and 
> > I feel like this is a property that needs to propagate through types
> 
> You mean, similar to the way trivial_abi works? That makes sense.

I am not sure about propagating. I added some documentation to make the spec of 
the attribute clearer. 

Specifically, it requires the objects of the type to be considered copied into 
new objects when passing to functions, i.e. code using the type isn't allowed 
to rely on previous pointers to the actual object e.g. via copy elision or NRVO.

Similarly, I think the guarantees are also different to `trivial_abi`, as there 
could be other pointers to the same object even if it is trivial via copy 
elision or NRVO. There's a thread where this problem in general has been 
discussed extensively a while ago 
https://lists.llvm.org/pipermail/cfe-dev/2020-July/066357.html


https://github.com/llvm/llvm-project/pull/95004
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to