Skip to content

[6.0.1🍒][cxx-interop] Do not import std::chrono::time_zone_link #76273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/ClangImporter/ImportDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2640,6 +2640,15 @@ namespace {
return nullptr;
}

// Bail if this is `std::chrono::tzdb`. This type causes issues in copy
// constructor instantiation.
// FIXME: https://github.com/apple/swift/issues/73037
if (decl->getDeclContext()->isNamespace() &&
decl->getDeclContext()->getParent()->isStdNamespace() &&
decl->getIdentifier() &&
(decl->getName() == "tzdb" || decl->getName() == "time_zone_link"))
return nullptr;

auto &clangSema = Impl.getClangSema();
// Make Clang define any implicit constructors it may need (copy,
// default). Make sure we only do this if the class has been fully defined
Expand Down