summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorMariya Podchishchaeva <mariya.podchishchaeva@intel.com>2025-04-02 09:25:43 +0200
committerGitHub <noreply@github.com>2025-04-02 09:25:43 +0200
commit8a691cc6157b2c3bc91af767eb1154d7a715562a (patch)
treeca2499b82984da8a27f5ab92972ddbbb3f4c23f0 /clang/lib/CodeGen/CGClass.cpp
parent5d364481e36871584affa54c58a803a936b9a5d6 (diff)
[MS][clang] Make sure vector deleting dtor calls correct operator delete (#133950)
During additional testing I spotted that vector deleting dtor calls operator delete, not operator delete[] when performing array deletion. This patch fixes that.
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r--clang/lib/CodeGen/CGClass.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp
index f508930cc9f2..c683dbb0af82 100644
--- a/clang/lib/CodeGen/CGClass.cpp
+++ b/clang/lib/CodeGen/CGClass.cpp
@@ -1489,7 +1489,7 @@ static void EmitConditionalArrayDtorCall(const CXXDestructorDecl *DD,
CGF.EmitBlock(callDeleteBB);
const CXXDestructorDecl *Dtor = cast<CXXDestructorDecl>(CGF.CurCodeDecl);
const CXXRecordDecl *ClassDecl = Dtor->getParent();
- CGF.EmitDeleteCall(Dtor->getOperatorDelete(), allocatedPtr,
+ CGF.EmitDeleteCall(Dtor->getArrayOperatorDelete(), allocatedPtr,
CGF.getContext().getTagDeclType(ClassDecl));
CGF.EmitBranchThroughCleanup(CGF.ReturnBlock);