Skip to content

Commit 9fdb0e7

Browse files
authored
Merge pull request #73102 from apple/egorzhdan/bail-on-tzdb-ns
[cxx-interop] Do not try to import `std::chrono::tzdb`, part 2
2 parents 38c8968 + 2bc4199 commit 9fdb0e7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/ClangImporter/ImportDecl.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2650,11 +2650,12 @@ namespace {
26502650
return nullptr;
26512651
}
26522652

2653-
// Bail if this is `std::tzdb`. This type causes issues in copy
2653+
// Bail if this is `std::chrono::tzdb`. This type causes issues in copy
26542654
// constructor instantiation.
26552655
// FIXME: https://github.com/apple/swift/issues/73037
2656-
if (decl->isInStdNamespace() && decl->getIdentifier() &&
2657-
decl->getName() == "tzdb")
2656+
if (decl->getDeclContext()->isNamespace() &&
2657+
decl->getDeclContext()->getParent()->isStdNamespace() &&
2658+
decl->getIdentifier() && decl->getName() == "tzdb")
26582659
return nullptr;
26592660

26602661
auto &clangSema = Impl.getClangSema();

0 commit comments

Comments
 (0)