Skip to content

Commit 9c5519a

Browse files
authored
Merge pull request #77098 from swiftlang/egorzhdan/chrono-linux-cxx23
[cxx-interop] Do not import `std::chrono::time_zone`
2 parents 940730e + c530d3c commit 9c5519a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/ClangImporter/ImportDecl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2754,7 +2754,8 @@ namespace {
27542754
if (decl->getDeclContext()->isNamespace() &&
27552755
decl->getDeclContext()->getParent()->isStdNamespace() &&
27562756
decl->getIdentifier() &&
2757-
(decl->getName() == "tzdb" || decl->getName() == "time_zone_link"))
2757+
(decl->getName() == "tzdb" || decl->getName() == "time_zone_link" ||
2758+
decl->getName() == "time_zone"))
27582759
return nullptr;
27592760

27602761
auto &clangSema = Impl.getClangSema();

test/Interop/Cxx/stdlib/use-std-chrono.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// RUN: %target-run-simple-swift(-I %S/Inputs -cxx-interoperability-mode=upcoming-swift -Xcc -std=c++14)
55
// RUN: %target-run-simple-swift(-I %S/Inputs -cxx-interoperability-mode=upcoming-swift -Xcc -std=c++17)
66
// RUN: %target-run-simple-swift(-I %S/Inputs -cxx-interoperability-mode=upcoming-swift -Xcc -std=c++20)
7+
// TODO once macOS CI supports C++23: %target-run-simple-swift(-I %S/Inputs -cxx-interoperability-mode=upcoming-swift -Xcc -std=c++23)
78

89
// REQUIRES: executable_test
910

0 commit comments

Comments
 (0)