================ @@ -2801,6 +2801,10 @@ static bool isTriviallyCopyableTypeImpl(const QualType &type, if (type.hasNonTrivialObjCLifetime()) return false; + QualType::PrimitiveCopyKind PCK = type.isNonTrivialToPrimitiveCopy(); + if (PCK != QualType::PCK_Trivial && PCK != QualType::PCK_VolatileTrivial) ---------------- ojhunt wrote:
I did a bunch of spelunking, this specific change predates `QualType::hasAddressDiscriminatedPointerAuth`. Given that exists now we can make this code much less pessimistic: * We use hasAddressDiscriminatedPointerAuth to exclude primitive types with address discrimination * And if we have a record type we check `Decl::isNonTrivialToPrimitiveCopy` which covers transitive inclusion of address discrimination https://github.com/llvm/llvm-project/pull/136783 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits