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