Skip C++ types when generating Destroy witnesses (#6732)

This TODO had been written before C++ types were generating destroy
implementations, which is resolved now.

Assisted-by: Google Antigravity with Gemini 3 Flash
This commit is contained in:
Jon Ross-Perkins
2026-02-14 00:43:11 +00:00
committed by GitHub
parent b3d57aff7a
commit 64e3fab43a
24 changed files with 119 additions and 500 deletions
+2
View File
@@ -83,6 +83,8 @@ auto LookupCppImpl(Context& context, SemIR::LocId loc_id,
SemIR::SpecificInterfaceId query_specific_interface_id,
const TypeStructure* best_impl_type_structure,
SemIR::LocId best_impl_loc_id) -> SemIR::InstId {
// TODO: This should provide `Destroy` for enums and other trivially
// destructible types.
auto* class_decl = TypeAsClassDecl(context, query_self_const_id);
if (!class_decl) {
return SemIR::InstId::None;