swift-ci
2c2900a229
Merge remote-tracking branch 'origin/main' into rebranch
2023-02-09 06:33:03 -08:00
Alex Lorenz
b70ba0963d
[interop][SwiftToCxx] remove extraneous ';' from generated header
2023-02-08 12:43:30 -08:00
Alex Lorenz
0b0cc99c98
[interop][SwiftToCxx] avoid -Wshadow warning for C++ representation of enum member parameters
2023-02-08 12:33:18 -08:00
swift-ci
7fc8b1111d
Merge remote-tracking branch 'origin/main' into rebranch
2023-01-17 17:15:15 -08:00
Alex Lorenz
cc5b557cee
[interop][SwiftToCxx] Attach SWIFT_SYMBOL to C++ enum case declarations
2023-01-12 14:01:30 -08:00
Alex Lorenz
3b3d6c825a
[interop][SwiftToCxx] Annotate emitted declarations with Clang's external_source_symbol attribute
...
Each emitted declaration is annotated with the external_source_symbol with its own USR, to allow Clang's indexer to recognize this declaration as a Swift declaration with a specific USR
2023-01-12 12:15:01 -08:00
swift-ci
efb80004f1
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-15 14:33:36 -08:00
Alex Lorenz
15b100784b
[interop][SwiftToCxx] relax the swift-stdlib-in-cxx.swift testcase
2022-12-15 07:15:52 -08:00
Alex Lorenz
a7ec9f1fcb
[interop][SwiftToCxx] also test for UTF8View API in the test
2022-12-14 16:30:59 -08:00
Alex Lorenz
5e09a5c30b
[interop][SwiftToCxx] move std::string -> Swift String constructor to the overlay header
2022-12-14 16:27:29 -08:00
Alex Lorenz
28af8bef55
[interop][SwiftToCxx] make it possible to convert Swift String to a std::string in C++
...
This is done by exposing nested Index and UTF8View type in String. Nested types aren't
supported yet, so we need to employ a number of hacks to emit them.
2022-12-14 16:22:41 -08:00
swift-ci
8df84bd87a
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-13 20:54:17 -08:00
Alex Lorenz
5c703b4f5c
[interop][SwiftToCxx] support std::string -> Swift::String conversion in C++
2022-12-13 13:13:05 -08:00
Erik Eckstein
d89c6b2d70
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-01 07:48:51 +01:00
Alex Lorenz
cd67584015
[interop][SwiftToCxx] support NSString -> Swift String bridging in C++
2022-11-29 16:52:50 -08:00
Alex Lorenz
83db71b64e
[interop][SwiftToCxx] use the more appropriate String -> NSString bridging invocation
...
This fixes some CI failures
2022-11-29 15:19:26 -08:00
Erik Eckstein
f811676220
rebranch: some test fixes
2022-11-09 18:26:26 +01:00
Alex Lorenz
0312e0613d
[interop][SwiftToCxxToSwift] hide reverse interop module namespaces from forward interop
2022-11-07 15:52:04 -08:00
Alex Lorenz
8336edd344
[interop][SwiftToCxx] add support for constructing generic enum cases in C++
...
We only support cases with no payload, or one associated value still
2022-11-03 12:21:27 -07:00
Alex Lorenz
6df54eb24a
[interop][SwiftToCxx] NFC, add a test that operates on generic Array in C++17 mode
2022-11-01 17:39:08 -07:00
Alex Lorenz
c179e23b19
[interop][SwiftToCxx] add static_assert type checking for generic types in pre-C++20 mode
2022-11-01 17:36:37 -07:00
Alex Lorenz
a66cc52109
[interop][SwiftToCxx] add static_assert type checking for generic functions in pre-C++20 mode
...
In the future we should also use enable_if to correctly resolve overloads
2022-11-01 17:21:01 -07:00
Alex Lorenz
4b52ae08fa
[interop][SwiftToCxx] check that generics can be built in C++17/C++14 mode
2022-11-01 16:40:42 -07:00
Alex Lorenz
953c124ceb
[interop][SwiftToCxx] guard 'requires' clauses in __cpp_concepts #ifdefs
2022-11-01 16:17:10 -07:00
Alex Lorenz
391b92fff7
[interop][SwiftToCxx] add some helper methods to work with Swift's Optional in C++
2022-10-05 14:21:13 -07:00
Alex Lorenz
2d961d9e8c
[interop][SwiftToCxx] do not print documentation comment for emitted methods if they're not actually emitted
2022-10-04 10:01:48 -07:00
Alex Lorenz
f8b54e7ea7
[interop][SwiftToCxx] guard inline emitted Stdlib module
2022-10-03 11:31:06 -07:00
Alex Lorenz
f6cc59246b
[interop][SwiftToCxx] fix the include path for swiftToCxx shim header for clang in /usr/local/bin/clang
2022-09-30 07:59:46 -07:00
Alex Lorenz
dd7e068391
[interop][SwiftToCxx] add a Swift stdlib overlay header
...
It currently provides begin and end functions for array iteration
2022-09-29 07:41:54 -07:00
Alex Lorenz
3a9b6dce9d
[interop][SwiftToCxx] add support for emitting Swift stdlib dependency in one header file
...
This is the default behavior. You can disable this by specifying the -clang-header-expose-decls= flag explicitly when generating the header
2022-09-28 08:08:48 -07:00
Alex Lorenz
717c29992d
[interop][SwiftToCxx] NFC, add a test for raw representable enum
2022-09-26 19:37:27 -07:00
Alex Lorenz
ae549531ac
Merge pull request #61225 from hyp/eng/fwd-generic-trait
...
[interop][SwiftToCxx] Declare the generic usability type trait before…
2022-09-21 15:56:14 -07:00
Alex Lorenz
2a05109c58
[interop][SwiftToCxx] Declare the generic usability type trait before the C++ class that represents the Swift type
...
This allows you to import a method that returns the type of the context in which the method is declared when such
type is a generic parameter in another type. This means that it's now possible to bridge the initializer for
RawRepresentable enums.
2022-09-21 07:57:32 -07:00
Alex Lorenz
1d6d3ff970
[interop][SwiftToCxx] trap on moves of Swift values for now
...
Move support will be added later
2022-09-21 06:59:29 -07:00
Alex Lorenz
143ce1e682
[interop][SwiftToCxx] bridge Swift's Optional type in an experimental manner
2022-09-15 12:35:33 -07:00
Alex Lorenz
8c48d268d5
[interop][SwiftToCxx] expose subscript getter for Array's operator []
2022-09-12 21:13:44 -07:00
Alex Lorenz
d5c531fefc
[interop][SwiftToCxx] experimentally expose exposable Swift's Array members to C++
2022-09-12 20:42:16 -07:00
Alex Lorenz
1d164039b1
[interop][SwiftToCxx] experimentally expose Swift's Array type
...
This is done without annotations on the stdlib yet while @_expose is still experimental
2022-09-08 11:04:03 -07:00
Alex Lorenz
06d9fd24d4
[interop][SwiftToCxx] add experimental Swift::String -> NSString conversion operator
2022-08-25 15:09:30 -07:00
Alex Lorenz
bd8c874e17
[interop][SwiftToCxx] experimentally expose Swift::String type to C++
...
The only member that's currently exposed is the default initializer, everything else is in extensions
2022-08-25 15:09:30 -07:00
Alex Lorenz
e9450cf80b
[interop][SwiftToCxx] add a test to print out empty Swift stdlib module
2022-08-24 15:10:11 -07:00