[clang] [Clang] Fix constexpr-ness on implicitly deleted destructors (PR #116359)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 27 02:45:18 PST 2024
================
@@ -1213,8 +1213,13 @@ void CXXRecordDecl::addedMember(Decl *D) {
data().DefaultedCopyAssignmentIsDeleted = true;
if (FieldRec->hasNonTrivialMoveAssignment())
data().DefaultedMoveAssignmentIsDeleted = true;
- if (FieldRec->hasNonTrivialDestructor())
+ if (FieldRec->hasNonTrivialDestructor()) {
data().DefaultedDestructorIsDeleted = true;
+ // C++20 [dcl.constexpr]p5:
+ // The definition of a constexpr destructor whose function-body is
+ // [not = delete] shall additionally satisfy...
----------------
cor3ntin wrote:
```suggestion
// not = delete shall additionally satisfy...
```
https://github.com/llvm/llvm-project/pull/116359
More information about the cfe-commits
mailing list