[clang] [RFC] Initial implementation of P2719 (PR #113510)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 1 22:48:34 PDT 2025
================
@@ -1392,7 +1393,13 @@ static UsualDeleteParams getUsualDeleteParams(const FunctionDecl *FD) {
const FunctionProtoType *FPT = FD->getType()->castAs<FunctionProtoType>();
auto AI = FPT->param_type_begin(), AE = FPT->param_type_end();
- // The first argument is always a void*.
+ if (FD->isTypeAwareOperatorNewOrDelete()) {
+ Params.TypeAwareDelete = TypeAwareAllocationMode::Yes;
+ assert(AI != AE);
+ ++AI;
+ }
+
+ // The first non-type argument is always a void*.
----------------
ojhunt wrote:
fixed this comment to use the spec term "the type-identity parameter"
<!-- Reviewable comment -OMp-p2s6hCHZwqfq120:b-78caat -->
<!-- Sent from Reviewable.io -->
https://github.com/llvm/llvm-project/pull/113510
More information about the cfe-commits
mailing list