[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 07:06:50 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:

Actually, at least with type-aware operator delete I can write code that makes `GlobalOperatorDelete` null. So it probably needs to be checked before calling `MarkFunctionReferenced`. That is a great catch, thank you!

https://github.com/llvm/llvm-project/pull/170337


More information about the lldb-commits mailing list