[clang] Sema: Fix CXXRecordDecl::isTriviallyCopyable() for classes with all deleted special functions. (PR #94831)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 28 05:47:47 PDT 2024
================
@@ -1462,6 +1473,10 @@ void CXXRecordDecl::addedEligibleSpecialMemberFunction(const CXXMethodDecl *MD,
if (!MD->isUserProvided())
data().DeclaredNonTrivialSpecialMembersForCall |= SMKind;
}
+
+ if (MD->isDeleted()) {
+ data().HasDeletedSpecialMembers |= SMKind;
+ }
----------------
AaronBallman wrote:
```suggestion
if (MD->isDeleted())
data().HasDeletedSpecialMembers |= SMKind;
```
https://github.com/llvm/llvm-project/pull/94831
More information about the cfe-commits
mailing list