[clang] [win][clang] Align scalar deleting destructors with MSABI (PR #139566)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 24 06:11:04 PDT 2025
================
@@ -2886,6 +2887,16 @@ class CXXDestructorDecl : public CXXMethodDecl {
return getCanonicalDecl()->OperatorDelete;
}
+ const FunctionDecl *getOperatorGlobalDelete() const {
+ return getCanonicalDecl()->OperatorGlobalDelete;
+ }
+
+ void setOperatorGlobalDelete(FunctionDecl *OD) {
----------------
Fznamznon wrote:
@tahonermann The only difference between `isReplaceableGlobalAllocationFunction()` and `isUsableAsGlobalAllocationFunctionInConstantEvaluation()` is that `isReplaceableGlobalAllocationFunction()` always returns false for type aware operator delete. I think we want a usual deallocation function which includes type-aware operator delete, because if I'm reading https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p2719r5.html#basic.stc.dynamic.deallocation correctly, it is.
The check for delete operator is already present.
https://github.com/llvm/llvm-project/pull/139566
More information about the cfe-commits
mailing list