================
@@ -2886,6 +2887,16 @@ class CXXDestructorDecl : public CXXMethodDecl {
return getCanonicalDecl()->OperatorDelete;
}
+ const FunctionDecl *getOperatorGlobalDelete() const {
+ return getCanonicalDecl()->OperatorGlobalDelete;
+ }
+
+ void setOperatorGlobalDelete(FunctionDecl *OD) {
+ auto *First = cast<CXXDestructorDecl>(getCanonicalDecl());
+ if (OD && !First->OperatorGlobalDelete)
+ First->OperatorGlobalDelete = OD;
----------------
tahonermann wrote:
Good question. Adding a parallel set of functions seems reasonable to me. It
might also be reasonable to tie the updates together, but I think that might
unnecessarily increase the serialized AST size for Itanium targets. Perhaps
that can be avoided in either case; it isn't obvious to me.
While looking at this some more, I noticed that it looks like updates will be
needed to `clang/lib/AST/ASTImporter.cpp` as well; see the call to
`setOperatorDelete()` in `ASTNodeImporter::VisitFunctionDecl()`.
https://github.com/llvm/llvm-project/pull/139566
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits