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

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 2 19:36:04 PDT 2025


================
@@ -3552,6 +3552,53 @@ void FunctionDecl::setIsTypeAwareOperatorNewOrDelete(bool IsTypeAware) {
   getASTContext().setIsTypeAwareOperatorNewOrDelete(this, IsTypeAware);
 }
 
+UsualDeleteParams FunctionDecl::getUsualDeleteParams() const {
+  UsualDeleteParams Params;
+
+  // This function should only be called for operator delete declarations.
+  assert(getDeclName().isAnyOperatorDelete());
+  if (!getDeclName().isAnyOperatorDelete())
+    return Params;
+
+  const FunctionProtoType *FPT = getType()->castAs<FunctionProtoType>();
+  auto AI = FPT->param_type_begin(), AE = FPT->param_type_end();
----------------
erichkeane wrote:

Thats pre-existing (though different capitalization, but I'll guess it is supposed to be 'args-iterator' and 'args-end'. But thats a guess, and also kinda wrong, since these are parameters not args.

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


More information about the cfe-commits mailing list