[clang] [RFC] Initial implementation of P2719 (PR #113510)

Oliver Hunt via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 25 14:05:13 PDT 2025


================
@@ -3503,9 +3518,23 @@ bool FunctionDecl::isDestroyingOperatorDelete() const {
       getNumParams() < 2)
     return false;
 
-  auto *RD = getParamDecl(1)->getType()->getAsCXXRecordDecl();
-  return RD && RD->isInStdNamespace() && RD->getIdentifier() &&
-         RD->getIdentifier()->isStr("destroying_delete_t");
+  if (isTypeAwareOperatorNewOrDelete())
+    return false;
+
+  return getParamDecl(1)->getType()->isDestroyingDeleteT();
----------------
ojhunt wrote:

I just did a quick check, we're currently at a 45 bits for FunctionDeclBits so adding these bits shouldn't increase the size of anything, but would require reducing the bits available to NumCtorInitializers in CXXConstructorDecl

https://github.com/llvm/llvm-project/pull/113510


More information about the cfe-commits mailing list