================ @@ -1120,6 +1120,14 @@ class QualType { /// Return true if this is a trivially copyable type (C++0x [basic.types]p9) bool isTriviallyCopyableType(const ASTContext &Context) const; + /// Return true if the type is safe to bitwise copy by memcpy. + /// + /// This is an extension in clang: bitwise clonable types act as trivially ---------------- ilya-biryukov wrote:
We should update the documentation to talk about the things that we are actually checking now, i.e. that `memcpy` will succeed and have a valid object representation, even if the lifetime is not formally started. Mentioning when it's not the case would also be helpful: - memcpy fails, e.g. sanitizers that add padding with poison. - (potentially) types with ObjC lifetimes. https://github.com/llvm/llvm-project/pull/86512 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits