[clang] [Clang][NFC] Refactor operator delete argument handling (PR #160554)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 1 12:14:16 PDT 2025


================
@@ -2646,6 +2647,8 @@ class FunctionDecl : public DeclaratorDecl,
   bool isTypeAwareOperatorNewOrDelete() const;
   void setIsTypeAwareOperatorNewOrDelete(bool IsTypeAwareOperator = true);
 
+  UsualDeleteParams getUsualDeleteParams() const;
----------------
erichkeane wrote:

I don't have a concern with it.  Though, you can't really call the function at all without also including ExprCXX.h of course (since it returns a type requiring completeness).

We do this a few other places of course.


The `std::optional` might be nice, but what state is it supposed to represent?  Are you just meaning "for a non-delete decl"? At that point, an assert is probably even better.

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


More information about the cfe-commits mailing list