[clang] [Clang][NFC] Refactor operator delete argument handling (PR #160554)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 3 11:47:52 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();
----------------
shafik wrote:
Sure you can squint and say it is existing code but if no one understand what the variable names mean, it probably makes sense to just rename them. Your idea seems plausible.
https://github.com/llvm/llvm-project/pull/160554
More information about the cfe-commits
mailing list