zoecarver
98803ec992
[cxx-interop] [nfc] HasMemberWithDestructor => StructWithSubobjectDestructor in comment.
...
The type "HasMemberWithDestructor" doesn't exist. It was replaced with
StructWithSubobjectDestructor but the comment wasn't updated.
2020-07-27 19:15:05 -07:00
zoecarver
5c3ccf5050
[cxx-interop] Temporarily disable emitting debug info for C++ types.
...
When we try to emit debug info from C++ types we crash because we can't deserialize them. This is a temporary fix to circumnavigate the crash before a real fix can be created.
2020-07-23 12:10:06 -07:00
zoecarver
13632d4c9c
[cxx-interop] Mark types with a destructor a non-trivial.
...
Any C++ type that isn't trivially copyable is now also not a trivial type. This will preserve the destructor (among other things).
2020-07-10 08:51:30 -07:00
Dmitri Gribenko
3de9e5ac77
Rename synthesized initializer test to follow the pattern
...
And also removed a test that is semantically a duplicate of the
synthesized initializer test.
2020-07-09 12:11:08 +02:00
zoecarver
4b14487345
[NFC] [cxx-interop] Add SILGen tests for synthesized initializers.
...
Adds a basic test that the synthesized C++ constructor was generated correctly.
2020-07-02 15:07:42 -07:00
Martin Boehme
1607ecfb0a
Fix warnings in loadable-types.h.
...
The copy and move assignment operators weren't returning anything and
were hence producing "non-void function does not return a value"
warnings.
As the test doesn't actually need a definition for these operators, I've
removed the definition and simply declared them.
2020-05-20 08:08:51 +02:00
Michael Forster
e69abeba53
Classify C++ structs as loadable or address-only ( #31707 )
...
* Classify C++ structs as loadable or address-only
C++ structs are only loadable if they are trivially copyable.
Resolves SR-12472.
2020-05-13 17:16:47 +02:00
Michael Forster
07c9fdd9e6
Synthesize memberwise initializers despite member functions
...
Previously unimportable member functions inhibited the synthesis of
memberwise initializers.
2020-05-08 14:26:21 +02:00
Dmitri Gribenko
e355430927
Merge pull request #31619 from MForster/m/memberwise-initializer
...
Synthesize memberwise initializers despite AccessSpecDecl
2020-05-08 01:07:49 +02:00
Dmitri Gribenko
53055fa73c
Merge pull request #31617 from martinboehme/cxx-protocol-conformance
...
Add a test that imported C++ classes can conform to protocols
2020-05-07 19:46:26 +02:00
Michael Forster
d611b4c4f5
Synthesize memberwise initializers despite AccessSpecDecl
...
Previously the mere presence of `public:` or `private:` inhibited the
synthesis of memberwise initializers.
2020-05-07 17:44:41 +02:00
Martin Boehme
6224909d37
Add a test that imported C++ classes can conform to protocols.
...
Currently, trying to do this causes an assertion failure in SILGen, so the
corresponding line in the SILGen test is commented out.
See https://bugs.swift.org/browse/SR-12750
2020-05-07 14:43:21 +02:00
Marcel Hlopko
2fbcf184ed
Add header guards to test/Interop
2020-04-30 16:13:33 +02:00
Marcel Hlopko
6c9ccbc59b
Add header guards for test input headers
2020-04-30 15:49:20 +02:00
Marcel Hlopko
883262771b
Expose C++ static members as Swift static properties
2020-04-23 15:33:43 +02:00
Michael Forster
f609a7cbb4
Unify layout for C++ interop tests
...
This was discussed here:
https://forums.swift.org/t/reorganize-swift-compiler-tests-for-c-objc-c-interop/34411
Resolves: [SR-12475](https://bugs.swift.org/browse/SR-12475 )
2020-04-06 09:38:18 +02:00
Michael Forster
98bbb81f82
[C++] Make const member variables read-only
...
This imports const members of C++ structs/classes stored properties with
an inaccessible setter.
Note that in C++ there are ways to change the values of const members,
so we don't use `WriteImplKind::Immutable` storage.
Resolves: [SR-12463](https://bugs.swift.org/browse/SR-12463 )
2020-04-03 13:15:33 +02:00