Commit Graph

6 Commits

Author SHA1 Message Date
Pavel Yaskevich
0987555a9c [Tests] NFC: Temporarily disable test/Interop/Cxx/stdlib/use-std-function.swift
The test is blocking nightly toolchains.
2024-06-27 21:12:40 -07:00
Egor Zhdan
3243228897 [cxx-interop] Allow initializing std::function from Swift closures
This adds a Swift initializer to instantiations of `std::function` that accepts a Swift closure with `@convention(c)`.

rdar://103979602
2024-06-14 19:05:45 +01:00
Egor Zhdan
1be7230876 [cxx-interop] Use C++17 standard by default
Clang is using C++17 standard version by default since Clang 16.

Swift’s ClangImporter should do the same, to make sure that clients who run clang and then swiftc without explicit std version see consistent behavior.

rdar://125777068
2024-04-02 16:23:32 +01:00
Egor Zhdan
19a257b36b [cxx-interop] Test stdlib support with newer C++ standards 2024-03-21 16:44:38 +00:00
Egor Zhdan
78b9de1391 [cxx-interop] Run tests with swift-6 compat mode 2024-02-23 16:24:14 +00:00
Egor Zhdan
2d0863aba2 [cxx-interop] Initial tests for std::function usage
This makes sure that `std::function` is imported consistently on supported platforms, and that it allows basic usage: calling a function with `callAsFunction`, initializing an empty function, and passing a function retrieved from C++ back to C++ as a parameter.

rdar://103979602
2024-01-11 12:02:12 +00:00