Commit Graph

6 Commits

Author SHA1 Message Date
Egor Zhdan
8f8a242390 [cxx-interop] Fix a test on older macOS versions
This is a test for C++ foreign reference types, which require Swift runtime support that was added in macOS 13.3.

rdar://127991790
2024-05-17 16:09:16 +01:00
zoecarver
13b0a5bc37 [nfc] Clang format changes. 2022-07-21 17:34:36 -04:00
zoecarver
74d76e2888 [cxx-interop] Add diagnostics and validation for retain/release function; require all foreign reference types to provide retain release functions or be immortal. 2022-07-21 12:25:21 -04:00
zoecarver
6acffbbee6 [cxx-interop] Flip the switch: only import safe APIs. 2022-07-18 17:15:15 -04:00
Egor Zhdan
5aea9195e3 [cxx-interop] Update tests for foreign reference types
This fixes errors in tests:
```
/home/build-user/swift/test/Interop/Cxx/foreign-reference/Inputs/singleton.h:8:14: error: 'operator new' is missing exception specification 'noexcept'
inline void *operator new(size_t, void *p) { return p; }
             ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new:173:33: note: previous declaration is here
_GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
```
2022-07-04 19:06:11 +01:00
zoecarver
fc3b3a1d71 [cxx-interop] Implement foreign reference types.
This is an expiremental feature to allow an attribute, `import_as_ref`, to import a C++ record as a non-reference-counted reference type in Swift.
2021-12-08 15:35:18 +00:00