ilya-biryukov wrote:

Among the people in the thread @hokein, @sam-mccall and myself are not working 
on Clang anymore and definitely not on this PR.

There were some follow-ups not mention here, though. We ended up going a 
different route and implementing a builtin to check if doing `memcpy` will not 
break in practice, even if not strictly allowed by the standard. The particular 
case we were interested in was copying objects with vtables, but no interior 
pointers. This turned out to only break in practice in certain sanitizer 
configurations (that used the padding bytes for sanitizer checks) and it was 
good enough for our use-case (copying some types like that in protobuf for 
performance reasons).

The relevant changed landed as a `__is_bitwise_cloneable` type trait in 
https://github.com/llvm/llvm-project/commit/f6c1e65ddfa9e1a07919104be543a1f9eccbb519

https://github.com/llvm/llvm-project/pull/82776
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to