================ @@ -5863,6 +5869,26 @@ Sema::MarkBaseAndMemberDestructorsReferenced(SourceLocation Location, &DirectVirtualBases); } +void Sema::MarkBaseAndMemberDestructorsReferenced(SourceLocation Location, + CXXRecordDecl *ClassDecl) { + // Ignore dependent contexts. Also ignore unions, since their members never + // have destructors implicitly called. + if (ClassDecl->isDependentContext() || ClassDecl->isUnion()) + return; + + // FIXME: all the access-control diagnostics are positioned on the + // field/base declaration. That's probably good; that said, the + // user might reasonably want to know why the destructor is being + // emitted, and we currently don't say. ---------------- momo5502 wrote:
Hard for me to judge. It was added 15 years ago: https://github.com/llvm/llvm-project/commit/1064d7ef2992225ddbd792d1b54d144b809b5b39 I can remove it, if desired. https://github.com/llvm/llvm-project/pull/128866 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits