Commit Graph

15 Commits

Author SHA1 Message Date
Ryan Mansfield
6234dd159d [Tests] Enable staticMemberInitializedAtRuntime in inline-static-member-var.swift.
apple/swift#30914 has been merged so this part of the test can be enabled.
2024-08-27 15:00:30 -04:00
zoecarver
f0d5cb9a84 [cxx-interop] Lazily instanciate var types and compute their type. 2022-09-09 17:26:22 -07:00
zoecarver
6acffbbee6 [cxx-interop] Flip the switch: only import safe APIs. 2022-07-18 17:15:15 -04:00
Egor Zhdan
0aebf79676 C++ Interop: avoid adding static members to the value constructor
Value constructors for C++ structs shouldn't try to initialize static members of the struct.
2021-06-28 21:35:08 +03:00
zoecarver
794c0ea1f0 [cxx-interop] Don't crash when importing invalid decl.
If we see an invalid decl, rather than potentially crashing, simply
bail.
2021-03-19 11:38:18 -07:00
zoecarver
6bc2696e24 [cxx-interop] Inline constexpr vars.
If a static variable can be evaluated at compile time, create an
accessor using that value. This means static variables will always be
inlined and removed.

Note: currently this only works with numeric types.
2021-01-08 14:22:25 -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
Marcel Hlopko
848d823738 [cxx-interop] Cleanup a test now that we can import constructors (#34460) 2020-10-27 18:28:09 +01:00
Dmitri Gribenko
105c8f96b1 Merge pull request #31441 from hlopko/header-guards
Add header guards to headers in test/interop
2020-04-30 20:51:07 +02:00
Marcel Hlopko
2fbcf184ed Add header guards to test/Interop 2020-04-30 16:13:33 +02:00
Marcel Hlopko
edbd902a90 Change C++ extension for test inputs from .cc to .cpp 2020-04-30 15:34:16 +02:00
Dmitri Gribenko
fb7020f3f7 Merge pull request #31396 from hlopko/static-member-func
Test static member functions
2020-04-30 12:21:56 +02:00
Marcel Hlopko
cf62838aad Test static member functions 2020-04-29 15:37:15 +02:00
Marcel Hlopko
6e50c91b37 [CxxInterop] Add tests for static vars
[SR-12464](https://bugs.swift.org/browse/SR-12464)
2020-04-29 10:19:37 +02:00
Marcel Hlopko
883262771b Expose C++ static members as Swift static properties 2020-04-23 15:33:43 +02:00