================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to