Support for calling C++ destructors. (#6453)

Synthesize an impl of `Destroy` for C++ classes in response to impl
lookup.
This commit is contained in:
Richard Smith
2025-12-09 21:03:27 +00:00
committed by GitHub
parent 2d38978756
commit c7cd24e1b2
28 changed files with 923 additions and 923 deletions
+3
View File
@@ -30,6 +30,9 @@ static auto GetGlobalDecl(const clang::FunctionDecl* decl)
if (const auto* ctor = dyn_cast<clang::CXXConstructorDecl>(decl)) {
return clang::GlobalDecl(ctor, clang::CXXCtorType::Ctor_Complete);
}
if (const auto* dtor = dyn_cast<clang::CXXDestructorDecl>(decl)) {
return clang::GlobalDecl(dtor, clang::CXXDtorType::Dtor_Complete);
}
return clang::GlobalDecl(decl);
}