================
@@ -1131,13 +1132,18 @@ static bool isTrivialForMSVC(const CXXRecordDecl *RD, 
QualType Ty,
     return false;
   if (RD->hasNonTrivialCopyAssignment())
     return false;
+  if (RD->needsImplicitCopyAssignment() && !RD->hasSimpleCopyAssignment())
----------------
efriedma-quic wrote:

If I'm understanding correctly, this is basically split into two parts:

- If we implicitly declared the copy-assignment, just query isDeleted() on it 
directly.
- If we didn't implicitly declare the copy-assignment, check whether it would 
have been deleted.  (We can't use this in cases where the copy-assignment was 
declared because the information isn't stored in the CXXRecordDecl.)

This is kind of complicated, but I can't think of a simpler way to do it.  That 
said, it probably deserves a comment to explain the logic.

https://github.com/llvm/llvm-project/pull/90547
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to