================
@@ -2749,6 +2749,17 @@ bool QualType::isTriviallyCopyableType(const ASTContext 
&Context) const {
                                      /*IsCopyConstructible=*/false);
 }
 
+bool QualType::isBitwiseCloneableType(const ASTContext & Context) const {
+  if (const auto *RD = getCanonicalType()->getAsCXXRecordDecl()) {
----------------
ilya-biryukov wrote:

Should we also disallow the objects that return true for 
`hasNonTrivialObjCLifetime`?
That's the part of the `is_trivially_copyable` that seems relevant. I don't 
have a good understanding of ObjC, so I'd rather lean on the safe side here. 
(I.e. maybe there are low-level ways to update the reference counters after 
`memcpy`, I don't really know. But assuming there aren't, I'd rather lean on 
the side of returning false for this trait)

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

Reply via email to