Commit Graph

12 Commits

Author SHA1 Message Date
Alex Lorenz
ba5b1bab89 [cxx-interop] Use a synthesized C++ method when invoking a base method from a derived class synthesized method
The use of a synthesized C++ method allows us to avoid making a copy of self when invoking the base method from Swift
2023-09-29 13:52:10 -07:00
Alex Lorenz
ba8d4d7801 [cxx-interop] compilations that do not enable C++ interoperability should not be able to import modules that do enable C++ interoperability by default
A supplemental hidden frontend option allows advanced users to opt-out of this requirement.

Fixes https://github.com/apple/swift/issues/65833
Fixes https://github.com/apple/swift/issues/65832
2023-06-09 15:38:16 -07:00
Alex Lorenz
b17ade9391 [cxx-interop] implicitly imported CxxShim module should not force client modules to enable C++ interoperability
Fixes https://github.com/apple/swift/issues/65831
2023-05-15 10:10:56 -07:00
Ehud Adler
e7fe6f0fe7 Fix tests and re-enable support for CXX operators 2022-05-21 21:28:03 -04:00
Ehud Adler
11730e8f07 Remap class operator function names (-/+/*....) to imported operator names __operator(Minus, Plus,...) and fix test cases 2022-05-18 10:31:04 -04:00
zoecarver
f652361af3 [cxx-interop] Remove 'support' for importing C++ operators.
This does not include subscript operators.

Before this is re-enabled operators need to be re-implemented. Right now they are the source of a lot of bugs. They cause frequent crashes and mis compiles. Also, templated operators insert a lot of names into global lookup which causes problems.

They also don't work on Windows.
2022-03-30 15:39:35 -07:00
Saleem Abdulrasool
357face86e test: introduce new target-swiftxx-frontend for C++ interop
Add an convert to the new `target-swiftxx-frontend` substitution in lit
to control the C++ interop enabling in Swift.  This allows for a single
site which will enable control of both an overridden standard (for
testing multiple C++ standards) and simplify writing tests.
2021-01-12 11:45:36 -08:00
Saleem Abdulrasool
df9d1e815f Interop/Cxx: explicitly require C++ for modules
The C++ interop modules require C++ support.  Explicitly require C++ as
a feature when building these modules.  This has no impact on the
changes as all the tests enable C++ already.
2021-01-06 16:59:42 -08:00
Rosica Dejanovska
1a18225ef9 Polish PR 2020-11-10 11:22:38 +01:00
Rosica Dejanovska
3ca701e561 Change logic for visible decls lookup 2020-11-06 14:46:25 +01:00
Rosica Dejanovska
8062bfcbb8 Format files 2020-10-29 17:07:00 +01:00
Rosica Dejanovska
679ce361aa Add more tests 2020-10-29 16:55:10 +01:00