mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
In order to allow supporting `__strong` (and `__weak`) struct fields, some parts of the ClangImporter needs to understand them. The changes in this commit allows the type importer to allow the already supported `__unsafe_unretained` struct fields, but still reject the `__strong` and `__weak` fields. Later changes will add support for bridging `__strong` and `__weak` fields. All the code should be equivalent to the previous code, and since all the structs with non-trivial copy/destroy are completely discarded, the code should not even be hit in any case. The included modifications in the tests check that the error and the diagnostics note are produced correctly.
2.2 KiB
2.2 KiB