[clang] [RFC] Initial implementation of P2719 (PR #113510)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 7 00:20:44 PST 2025
================
@@ -9784,10 +9850,16 @@ bool Sema::ShouldDeleteSpecialMember(CXXMethodDecl *MD,
// results in an ambiguity or in a function that is deleted or inaccessible
if (CSM == CXXSpecialMemberKind::Destructor && MD->isVirtual()) {
FunctionDecl *OperatorDelete = nullptr;
+ QualType DeallocType = Context.getRecordType(RD);
DeclarationName Name =
Context.DeclarationNames.getCXXOperatorName(OO_Delete);
+ ImplicitDeallocationParameters IDP = {
+ DeallocType,
+ typeAwareAllocationModeFromBool(getLangOpts().TypeAwareAllocators),
+ AlignedAllocationMode::No, SizedDeallocationMode::No};
if (FindDeallocationFunction(MD->getLocation(), MD->getParent(), Name,
- OperatorDelete, /*Diagnose*/false)) {
+ OperatorDelete, IDP,
+ /*Diagnose*/ false)) {
----------------
cor3ntin wrote:
```suggestion
/*Diagnose=*/false)) {
```
https://github.com/llvm/llvm-project/pull/113510
More information about the cfe-commits
mailing list