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

Per [\[expr.delete\]p8](https://eel.is/c++draft/expr.delete#8), `OD` shall 
point to a [*usual deallocation 
function*](https://eel.is/c++draft/basic.stc.dynamic.deallocation#def:usual_deallocation_function).
 Can that be asserted somehow? I found `Sema::isUsualDeallocationFunction()` 
and `CXXMethodDecl::isUsualDeallocationFunction()`, but those only operate on 
`CXXMethodDecl` for some reason. It looks like 
`isNonPlacementDeallocationFunction()` in `clang/lib/Sema/SemaExprCXX.cpp` 
might be helpful, but it is declared `static`.

https://github.com/llvm/llvm-project/pull/139566
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to