[clang] [RFC] Initial implementation of P2719 (PR #113510)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 24 02:17:19 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();
----------------
cor3ntin wrote:
Question (ditto) below - do we get a better diagnostic if anything that has type_identity is considered type aware even with a bogus number of arguments?
https://github.com/llvm/llvm-project/pull/113510
More information about the cfe-commits
mailing list