[clang] [Sema] Instantiate destructors for initialized members (PR #128866)
Maurice Heumann via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 11 00:30:04 PDT 2025
================
@@ -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:
@cor3ntin shall I remove it or keep it?
https://github.com/llvm/llvm-project/pull/128866
More information about the cfe-commits
mailing list