mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-18 10:30:29 +00:00
Support for calling C++ destructors. (#6453)
Synthesize an impl of `Destroy` for C++ classes in response to impl lookup.
This commit is contained in:
1 parent
2d38978756
commit
c7cd24e1b2
28 files changed
+923
-923
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user