[clang] [clang][CodeGen] Fix MSVC ABI for classes with non static data members of reference type (PR #90547)
Max Winkler via cfe-commits
cfe-commits at lists.llvm.org
Thu May 2 18:34:05 PDT 2024
================
@@ -1131,13 +1132,18 @@ static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty,
return false;
if (RD->hasNonTrivialCopyAssignment())
return false;
+ if (RD->needsImplicitCopyAssignment() && !RD->hasSimpleCopyAssignment())
----------------
MaxEW707 wrote:
I didn't find a `defaultedCopyAssignmentIsDeleted()` method on `CXXRecordDecl` however `hasSimpleCopyAssignment()` does what we want here when combined with `needsImplicitCopyAssignment()`.
Let me know if there is a better check to capture implicitly declared but deleted copy assignment operators on the record.
https://github.com/llvm/llvm-project/pull/90547
More information about the cfe-commits
mailing list