Import Objective-C properties marked weak/copy as weak/@NSCopying.

...and 'assign' and 'unsafe_unretained' as 'unowned(unsafe)', if the
property is a class type.

This isn't important for the compiler, but it is documentation for users
when they look at the generated interface for an Objective-C module.

Note that this actually produces a decl users can't yet write:

  unowned(unsafe) var foo: UIView!

That's <rdar://problem/17277899> unowned pointers can't be optional.

<rdar://problem/17245555>

Swift SVN r20433
This commit is contained in:
Jordan Rose
2014-07-23 22:29:01 +00:00
parent a2af37a19b
commit 00b6a5cb08
13 changed files with 151 additions and 43 deletions

View File

@@ -147,11 +147,12 @@ func testCompleteModuleQualifiedFoo2() {
Foo#^CLANG_QUAL_FOO_2^#
// If the number of results below changes, then you need to add a result to the
// list below.
// CLANG_QUAL_FOO_2: Begin completions, 58 items
// CLANG_QUAL_FOO_2: Begin completions, 59 items
// CLANG_QUAL_FOO_2-DAG: Decl[Class]/OtherModule: .FooClassBase[#FooClassBase#]{{$}}
// CLANG_QUAL_FOO_2-DAG: Decl[Class]/OtherModule: .FooClassDerived[#FooClassDerived#]{{$}}
// CLANG_QUAL_FOO_2-DAG: Decl[Class]/OtherModule: .ClassWithInternalProt[#ClassWithInternalProt#]{{$}}
// CLANG_QUAL_FOO_2-DAG: Decl[Struct]/OtherModule: ._InternalStruct[#_InternalStruct#]
// CLANG_QUAL_FOO_2-DAG: Decl[Class]/OtherModule: .FooClassPropertyOwnership[#FooClassPropertyOwnership#]{{$}}
// CLANG_QUAL_FOO_2-DAG: Decl[FreeFunction]/OtherModule: ._internalTopLevelFunc()[#Void#]
// CLANG_QUAL_FOO_2-DAG: Decl[Enum]/OtherModule: .FooComparisonResult[#FooComparisonResult#]{{$}}
// CLANG_QUAL_FOO_2-DAG: Decl[FreeFunction]/OtherModule: .fooFunc1({#(a): Int32#})[#Int32#]{{$}}