[clang] [win][clang] Align scalar deleting destructors with MSABI (PR #139566)

Tom Honermann via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 23 21:57:43 PDT 2025


================
@@ -2886,6 +2887,16 @@ class CXXDestructorDecl : public CXXMethodDecl {
     return getCanonicalDecl()->OperatorDelete;
   }
 
+  const FunctionDecl *getOperatorGlobalDelete() const {
+    return getCanonicalDecl()->OperatorGlobalDelete;
+  }
+
+  void setOperatorGlobalDelete(FunctionDecl *OD) {
----------------
tahonermann wrote:

I don't think `isUsableAsGlobalAllocationFunctionInConstantEvaluation()` is quite right. But it looks like `isReplaceableGlobalAllocationFunction()` might be (along with a check that the function is a delete operator as opposed to a new operator).

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


More information about the cfe-commits mailing list