[clang] [RFC] Initial implementation of P2719 (PR #113510)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 7 00:20:44 PST 2025
================
@@ -3423,7 +3429,7 @@ bool FunctionDecl::isReplaceableGlobalAllocationFunction(
// In C++14, the next parameter can be a 'std::size_t' for sized delete.
bool IsSizedDelete = false;
- if (Ctx.getLangOpts().SizedDeallocation &&
+ if ((IsTypeAware || Ctx.getLangOpts().SizedDeallocation) &&
----------------
cor3ntin wrote:
I don't understand why we need to check for `IsTypeAware` here.
I would expect sized deallocation and type aware allocations to be independent features
https://github.com/llvm/llvm-project/pull/113510
More information about the cfe-commits
mailing list