[clang] [RFC] Initial implementation of P2719 (PR #113510)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 1 07:07:43 PDT 2024
================
@@ -1773,14 +1776,40 @@ static bool isNonPlacementDeallocationFunction(Sema &S, FunctionDecl *FD) {
namespace {
struct UsualDeallocFnInfo {
UsualDeallocFnInfo() : Found(), FD(nullptr) {}
- UsualDeallocFnInfo(Sema &S, DeclAccessPair Found)
+ UsualDeallocFnInfo(Sema &S, DeclAccessPair Found, QualType AllocType)
: Found(Found), FD(dyn_cast<FunctionDecl>(Found->getUnderlyingDecl())),
Destroying(false), HasSizeT(false), HasAlignValT(false),
- CUDAPref(SemaCUDA::CFP_Native) {
- // A function template declaration is never a usual deallocation function.
- if (!FD)
- return;
+ HasTypeIdentity(false), CUDAPref(SemaCUDA::CFP_Native) {
+ // A function template declaration is only a usual deallocation function
+ // if it is a typed delete
----------------
AaronBallman wrote:
```suggestion
// if it is a typed delete.
```
https://github.com/llvm/llvm-project/pull/113510
More information about the cfe-commits
mailing list