We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 658be5b commit 1629f1fCopy full SHA for 1629f1f
lib/IRGen/GenClangDecl.cpp
@@ -263,6 +263,10 @@ void IRGenModule::emitClangDecl(const clang::Decl *decl) {
263
// Unfortunately, implicitly defined CXXDestructorDecls don't have a real
264
// body, so we need to traverse these manually.
265
if (auto *dtor = dyn_cast<clang::CXXDestructorDecl>(next)) {
266
+ if (dtor->isImplicit() && dtor->isDefaulted() && !dtor->isDeleted() &&
267
+ !dtor->doesThisDeclarationHaveABody())
268
+ clangSema.DefineImplicitDestructor(dtor->getLocation(), dtor);
269
+
270
if (dtor->isImplicit() || dtor->hasBody()) {
271
auto cxxRecord = dtor->getParent();
272
0 commit comments