[Lldb-commits] [clang] [lldb] Reland [MS][clang] Add support for vector deleting destructors (PR #170337)
Mariya Podchishchaeva via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 9 06:15:57 PST 2025
================
@@ -11193,6 +11193,7 @@ bool Sema::CheckDestructor(CXXDestructorDecl *Destructor) {
FindDeallocationFunctionForDestructor(Loc, RD, /*Diagnose*/ false,
/*LookForGlobal*/ true, Name);
Destructor->setOperatorGlobalDelete(GlobalOperatorDelete);
+ MarkFunctionReferenced(Loc, GlobalOperatorDelete);
----------------
Fznamznon wrote:
I don't think the global operator delete is expected to be null here.
The comment is trying to explain why we don't diagnose any problems with it when calling `FindDeallocationFunctionForDestructor`, i.e. see `Dianose` flag passed as `false`. The diagnostics will be covered by `::delete` calls. Same is valid for array versions. This is done to avoid diagnosing lack of anything for implicit code generation that may never be used.
I'm open for reword suggestions.
https://github.com/llvm/llvm-project/pull/170337
More information about the lldb-commits
mailing list