| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| Name: SomeOtherKit | ||
| Classes: | ||
| - Name: A | ||
| Methods: | ||
| - Selector: "methodB" | ||
| MethodKind: Instance | ||
| Availability: none | ||
| AvailabilityMsg: "anything but this" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| Name: SomeBrokenLib | ||
| Functions: | ||
| - Name: do_something_with_pointers | ||
| Nu llabilityOfRet: O | ||
| # the space is intentional, to make sure we don't crash on malformed API Notes |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #ifndef SOME_BROKEN_LIB_H | ||
| #define SOME_BROKEN_LIB_H | ||
|
|
||
| void do_something_with_pointers(int *ptr1, int *ptr2); | ||
|
|
||
| #endif // SOME_BROKEN_LIB_H |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| Name: SomeBrokenLib | ||
| Functions: | ||
| - Name: do_something_with_pointers | ||
| NullabilityOfRet: O | ||
| - Name: do_something_with_pointers | ||
| NullabilityOfRet: O | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #ifndef SOME_BROKEN_LIB_H | ||
| #define SOME_BROKEN_LIB_H | ||
|
|
||
| void do_something_with_pointers(int *ptr1, int *ptr2); | ||
|
|
||
| #endif // SOME_BROKEN_LIB_H |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| extern int FrameworkWithActualPrivateModule; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| framework module FrameworkWithActualPrivateModule { | ||
| umbrella header "FrameworkWithActualPrivateModule.h" | ||
| export * | ||
| module * { export * } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| framework module FrameworkWithActualPrivateModule_Private { | ||
| umbrella header "FrameworkWithActualPrivateModule_Private.h" | ||
| export * | ||
| module * { export * } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Name: FrameworkWithActualPrivateModule_Private |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| #include <FrameworkWithActualPrivateModule/FrameworkWithActualPrivateModule.h> | ||
| extern int FrameworkWithActualPrivateModule_Private; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| extern int FrameworkWithWrongCase; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| framework module FrameworkWithWrongCase { | ||
| umbrella header "FrameworkWithWrongCase.h" | ||
| export * | ||
| module * { export * } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Name: FrameworkWithWrongCase |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| extern int FrameworkWithWrongCasePrivate; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| framework module FrameworkWithWrongCasePrivate { | ||
| umbrella header "FrameworkWithWrongCasePrivate.h" | ||
| export * | ||
| module * { export * } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| module FrameworkWithWrongCasePrivate.Inner {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Name: FrameworkWithWrongCasePrivate |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| @import LayeredKitImpl; | ||
|
|
||
| // @interface declarations already don't inherit attributes from forward | ||
| // declarations, so in order to test this properly we have to /not/ define | ||
| // UpwardClass anywhere. | ||
|
|
||
| // @interface UpwardClass | ||
| // @end | ||
|
|
||
| @protocol UpwardProto | ||
| @end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| framework module LayeredKit { | ||
| umbrella header "LayeredKit.h" | ||
| export * | ||
| module * { export * } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| Name: LayeredKitImpl | ||
| Classes: | ||
| - Name: PerfectlyNormalClass | ||
| Availability: none | ||
| - Name: UpwardClass | ||
| Availability: none | ||
| Protocols: | ||
| - Name: UpwardProto | ||
| Availability: none |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| @protocol UpwardProto; | ||
| @class UpwardClass; | ||
|
|
||
| @interface PerfectlyNormalClass | ||
| @end | ||
|
|
||
| void doImplementationThings(UpwardClass *first, id <UpwardProto> second) __attribute((unavailable)); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| framework module LayeredKitImpl { | ||
| umbrella header "LayeredKitImpl.h" | ||
| export * | ||
| module * { export * } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| framework module SimpleKit { | ||
| umbrella header "SimpleKit.h" | ||
| export * | ||
| module * { export * } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| Name: SomeKit | ||
| Classes: | ||
| - Name: A | ||
| Methods: | ||
| - Selector: "transform:" | ||
| MethodKind: Instance | ||
| Availability: none | ||
| AvailabilityMsg: "anything but this" | ||
| - Selector: "transform:integer:" | ||
| MethodKind: Instance | ||
| NullabilityOfRet: N | ||
| Nullability: [ N, S ] | ||
| Properties: | ||
| - Name: intValue | ||
| PropertyKind: Instance | ||
| Availability: none | ||
| AvailabilityMsg: "wouldn't work anyway" | ||
| - Name: nonnullAInstance | ||
| PropertyKind: Instance | ||
| Nullability: N | ||
| - Name: nonnullAClass | ||
| PropertyKind: Class | ||
| Nullability: N | ||
| - Name: nonnullABoth | ||
| Nullability: N | ||
| - Name: B | ||
| Availability: none | ||
| AvailabilityMsg: "just don't" | ||
| - Name: C | ||
| Methods: | ||
| - Selector: "initWithA:" | ||
| MethodKind: Instance | ||
| DesignatedInit: true | ||
| - Name: OverriddenTypes | ||
| Methods: | ||
| - Selector: "methodToMangle:second:" | ||
| MethodKind: Instance | ||
| ResultType: 'char *' | ||
| Parameters: | ||
| - Position: 0 | ||
| Type: 'SOMEKIT_DOUBLE *' | ||
| - Position: 1 | ||
| Type: 'float *' | ||
| Properties: | ||
| - Name: intPropertyToMangle | ||
| PropertyKind: Instance | ||
| Type: 'double *' | ||
| Functions: | ||
| - Name: global_int_fun | ||
| ResultType: 'char *' | ||
| Parameters: | ||
| - Position: 0 | ||
| Type: 'double *' | ||
| - Position: 1 | ||
| Type: 'float *' | ||
| Globals: | ||
| - Name: global_int_ptr | ||
| Type: 'double *' | ||
| SwiftVersions: | ||
| - Version: 3.0 | ||
| Classes: | ||
| - Name: A | ||
| Methods: | ||
| - Selector: "transform:integer:" | ||
| MethodKind: Instance | ||
| NullabilityOfRet: O | ||
| Nullability: [ O, S ] | ||
| Properties: | ||
| - Name: explicitNonnullInstance | ||
| PropertyKind: Instance | ||
| Nullability: O | ||
| - Name: explicitNullableInstance | ||
| PropertyKind: Instance | ||
| Nullability: N |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| Name: SomeKit | ||
| Classes: | ||
| - Name: A | ||
| Methods: | ||
| - Selector: "privateTransform:input:" | ||
| MethodKind: Instance | ||
| NullabilityOfRet: N | ||
| Nullability: [ N, S ] | ||
| Properties: | ||
| - Name: internalProperty | ||
| Nullability: N | ||
| Protocols: | ||
| - Name: InternalProtocol | ||
| Availability: none | ||
| AvailabilityMsg: "not for you" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| #ifndef SOMEKIT_H | ||
| #define SOMEKIT_H | ||
|
|
||
| #define ROOT_CLASS __attribute__((objc_root_class)) | ||
|
|
||
| ROOT_CLASS | ||
| @interface A | ||
| -(A*)transform:(A*)input; | ||
| -(A*)transform:(A*)input integer:(int)integer; | ||
|
|
||
| @property (nonatomic, readonly, retain) A* someA; | ||
| @property (nonatomic, retain) A* someOtherA; | ||
|
|
||
| @property (nonatomic) int intValue; | ||
| @end | ||
|
|
||
| @interface B : A | ||
| @end | ||
|
|
||
| @interface C : A | ||
| - (instancetype)init; | ||
| - (instancetype)initWithA:(A*)a; | ||
| @end | ||
|
|
||
|
|
||
| @interface MyClass : A | ||
| - Inst; | ||
| + Clas; | ||
| @end | ||
|
|
||
| struct CGRect { | ||
| float origin; | ||
| float size; | ||
| }; | ||
| typedef struct CGRect NSRect; | ||
|
|
||
| @interface I | ||
| - (void) Meth : (NSRect[4])exposedRects; | ||
| - (void) Meth1 : (const I*)exposedRects; | ||
| - (void) Meth2 : (const I*)exposedRects; | ||
| - (void) Meth3 : (I*)exposedRects; | ||
| - (const I*) Meth4; | ||
| - (const I*) Meth5 : (int) Arg1 : (const I*)Arg2 : (double)Arg3 : (const I*) Arg4 :(const volatile id) Arg5; | ||
| - (volatile const I*) Meth6 : (const char *)Arg1 : (const char *)Arg2 : (double)Arg3 : (const I*) Arg4 :(const volatile id) Arg5; | ||
| @end | ||
|
|
||
| @class NSURL, NSArray, NSError; | ||
| @interface INTF_BLOCKS | ||
| + (void)getNonLocalVersionsOfItemAtURL:(NSURL *)url completionHandler:(void (^)(NSArray *nonLocalFileVersions, NSError *error))completionHandler; | ||
| + (void *)getNonLocalVersionsOfItemAtURL2:(NSURL *)url completionHandler:(void (^)(NSArray *nonLocalFileVersions, NSError *error))completionHandler; | ||
| + (NSError **)getNonLocalVersionsOfItemAtURL3:(int)url completionHandler:(void (^)(NSArray *nonLocalFileVersions, NSError *error))completionHandler; | ||
| + (id)getNonLocalVersionsOfItemAtURL4:(NSURL *)url completionHandler:(void (^)(int nonLocalFileVersions, NSError *error, NSURL*))completionHandler; | ||
| @end | ||
|
|
||
| #endif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| framework module SomeKit { | ||
| umbrella header "SomeKit.h" | ||
| export * | ||
| module * { export * } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| module SomeKit.Private { | ||
| header "SomeKit_Private.h" | ||
| export * | ||
|
|
||
| explicit module NullAnnotation { | ||
| header "SomeKit_PrivateForNullAnnotation.h" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| explicit framework module SomeKit.Private { | ||
| header "SomeKit_Private.h" | ||
| explicit NullAnnotation { header "SomeKit_PrivateForNullAnnotation.h" } | ||
| export * | ||
| module * { export * } | ||
| syntax error | ||
|
|
||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #ifndef SOMEKIT_PRIVATE_H | ||
| #define SOMEKIT_PRIVATE_H | ||
|
|
||
| #import <SomeKit/SomeKit.h> | ||
|
|
||
| @interface A(Private) | ||
| -(A*)privateTransform:(A*)input; | ||
|
|
||
| @property (nonatomic) A* internalProperty; | ||
| @end | ||
|
|
||
| @protocol InternalProtocol | ||
| @end | ||
|
|
||
| #endif | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #ifndef SOMEKIT_PRIVATE_H | ||
| #define SOMEKIT_PRIVATE_H | ||
|
|
||
| #import <SomeKit/SomeKitForNullAnnotation.h> | ||
|
|
||
| @interface A(Private) | ||
| -(A*)privateTransform:(A*)input; | ||
|
|
||
| @property (nonatomic) A* internalProperty; | ||
| @end | ||
|
|
||
| @protocol InternalProtocol | ||
| - (id) MomeMethod; | ||
| @end | ||
|
|
||
| #endif | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| Name: SomeKit | ||
| Classes: | ||
| - Name: A | ||
| Methods: | ||
| - Selector: "privateTransform:input:" | ||
| MethodKind: Instance | ||
| NullabilityOfRet: N | ||
| Nullability: [ N, S ] | ||
| Properties: | ||
| - Name: internalProperty | ||
| Nullability: N | ||
| Protocols: | ||
| - Name: InternalProtocol | ||
| Availability: none | ||
| AvailabilityMsg: "not for you" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| Name: SomeOtherKit | ||
| Classes: | ||
| - Name: A | ||
| Methods: | ||
| - Selector: "methodA" | ||
| MethodKind: Instance | ||
| Availability: none | ||
| AvailabilityMsg: "anything but this" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| Name: SomeOtherKit | ||
| Classes: | ||
| - Name: A | ||
| Methods: | ||
| - Selector: "methodA" | ||
| MethodKind: Instance | ||
| Availability: none | ||
| AvailabilityMsg: "anything but this" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| #ifndef SOME_OTHER_KIT_H | ||
|
|
||
| __attribute__((objc_root_class)) | ||
| @interface A | ||
| -(void)methodA; | ||
| -(void)methodB; | ||
| @end | ||
|
|
||
| #endif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| framework module SomeOtherKit { | ||
| umbrella header "SomeOtherKit.h" | ||
| export * | ||
| module * { export * } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| extern int TopLevelPrivateKit_Public; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| garbage here because this file shouldn't get read |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| framework module TopLevelPrivateKit { | ||
| umbrella header "TopLevelPrivateKit.h" | ||
| export * | ||
| module * { export * } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| framework module TopLevelPrivateKit_Private { | ||
| umbrella header "TopLevelPrivateKit_Private.h" | ||
| export * | ||
| module * { export * } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| garbage here because this file shouldn't get read |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Name: TopLevelPrivateKit_Private | ||
| Globals: | ||
| - Name: TopLevelPrivateKit_Private | ||
| Type: float |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| extern int TopLevelPrivateKit_Private; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| garbage here because this file shouldn't get read |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,156 @@ | ||
| Name: VersionedKit | ||
| Classes: | ||
| - Name: TestProperties | ||
| SwiftObjCMembers: true | ||
| Properties: | ||
| - Name: accessorsOnly | ||
| PropertyKind: Instance | ||
| SwiftImportAsAccessors: true | ||
| - Name: accessorsOnlyForClass | ||
| PropertyKind: Class | ||
| SwiftImportAsAccessors: true | ||
| - Name: accessorsOnlyExceptInVersion3 | ||
| PropertyKind: Instance | ||
| SwiftImportAsAccessors: true | ||
| - Name: accessorsOnlyForClassExceptInVersion3 | ||
| PropertyKind: Class | ||
| SwiftImportAsAccessors: true | ||
| Functions: | ||
| - Name: unversionedRenameDUMP | ||
| SwiftName: 'unversionedRename_NOTES()' | ||
| Tags: | ||
| - Name: APINotedFlagEnum | ||
| FlagEnum: true | ||
| - Name: APINotedOpenEnum | ||
| EnumExtensibility: open | ||
| - Name: APINotedClosedEnum | ||
| EnumExtensibility: closed | ||
| - Name: SoonToBeCFEnum | ||
| EnumKind: CFEnum | ||
| - Name: SoonToBeNSEnum | ||
| EnumKind: NSEnum | ||
| - Name: SoonToBeCFOptions | ||
| EnumKind: CFOptions | ||
| - Name: SoonToBeNSOptions | ||
| EnumKind: NSOptions | ||
| - Name: SoonToBeCFClosedEnum | ||
| EnumKind: CFClosedEnum | ||
| - Name: SoonToBeNSClosedEnum | ||
| EnumKind: NSClosedEnum | ||
| - Name: UndoAllThatHasBeenDoneToMe | ||
| EnumKind: none | ||
| Typedefs: | ||
| - Name: MultiVersionedTypedef34Notes | ||
| SwiftName: MultiVersionedTypedef34Notes_NEW | ||
| - Name: MultiVersionedTypedef345Notes | ||
| SwiftName: MultiVersionedTypedef345Notes_NEW | ||
| - Name: MultiVersionedTypedef4Notes | ||
| SwiftName: MultiVersionedTypedef4Notes_NEW | ||
| - Name: MultiVersionedTypedef45Notes | ||
| SwiftName: MultiVersionedTypedef45Notes_NEW | ||
| SwiftVersions: | ||
| - Version: 3.0 | ||
| Classes: | ||
| - Name: MyReferenceType | ||
| SwiftBridge: '' | ||
| - Name: TestGenericDUMP | ||
| SwiftImportAsNonGeneric: true | ||
| - Name: TestProperties | ||
| SwiftObjCMembers: false | ||
| Properties: | ||
| - Name: accessorsOnlyInVersion3 | ||
| PropertyKind: Instance | ||
| SwiftImportAsAccessors: true | ||
| - Name: accessorsOnlyForClassInVersion3 | ||
| PropertyKind: Class | ||
| SwiftImportAsAccessors: true | ||
| - Name: accessorsOnlyExceptInVersion3 | ||
| PropertyKind: Instance | ||
| SwiftImportAsAccessors: false | ||
| - Name: accessorsOnlyForClassExceptInVersion3 | ||
| PropertyKind: Class | ||
| SwiftImportAsAccessors: false | ||
| - Name: Swift3RenamedOnlyDUMP | ||
| SwiftName: SpecialSwift3Name | ||
| - Name: Swift3RenamedAlsoDUMP | ||
| SwiftName: SpecialSwift3Also | ||
| Functions: | ||
| - Name: moveToPointDUMP | ||
| SwiftName: 'moveTo(a:b:)' | ||
| - Name: acceptClosure | ||
| Parameters: | ||
| - Position: 0 | ||
| NoEscape: false | ||
| - Name: privateFunc | ||
| SwiftPrivate: false | ||
| Tags: | ||
| - Name: MyErrorCode | ||
| NSErrorDomain: '' | ||
| - Name: NewlyFlagEnum | ||
| FlagEnum: false | ||
| - Name: OpenToClosedEnum | ||
| EnumExtensibility: open | ||
| - Name: ClosedToOpenEnum | ||
| EnumExtensibility: closed | ||
| - Name: NewlyClosedEnum | ||
| EnumExtensibility: none | ||
| - Name: NewlyOpenEnum | ||
| EnumExtensibility: none | ||
| Typedefs: | ||
| - Name: MyDoubleWrapper | ||
| SwiftWrapper: none | ||
| - Name: MultiVersionedTypedef34 | ||
| SwiftName: MultiVersionedTypedef34_3 | ||
| - Name: MultiVersionedTypedef34Header | ||
| SwiftName: MultiVersionedTypedef34Header_3 | ||
| - Name: MultiVersionedTypedef34Notes | ||
| SwiftName: MultiVersionedTypedef34Notes_3 | ||
| - Name: MultiVersionedTypedef345 | ||
| SwiftName: MultiVersionedTypedef345_3 | ||
| - Name: MultiVersionedTypedef345Header | ||
| SwiftName: MultiVersionedTypedef345Header_3 | ||
| - Name: MultiVersionedTypedef345Notes | ||
| SwiftName: MultiVersionedTypedef345Notes_3 | ||
| - Version: 5 | ||
| Typedefs: | ||
| - Name: MultiVersionedTypedef345 | ||
| SwiftName: MultiVersionedTypedef345_5 | ||
| - Name: MultiVersionedTypedef345Header | ||
| SwiftName: MultiVersionedTypedef345Header_5 | ||
| - Name: MultiVersionedTypedef345Notes | ||
| SwiftName: MultiVersionedTypedef345Notes_5 | ||
| - Name: MultiVersionedTypedef45 | ||
| SwiftName: MultiVersionedTypedef45_5 | ||
| - Name: MultiVersionedTypedef45Header | ||
| SwiftName: MultiVersionedTypedef45Header_5 | ||
| - Name: MultiVersionedTypedef45Notes | ||
| SwiftName: MultiVersionedTypedef45Notes_5 | ||
| - Version: 4 # Versions are deliberately ordered as "3, 5, 4" to catch bugs. | ||
| Classes: | ||
| - Name: Swift4RenamedDUMP | ||
| SwiftName: SpecialSwift4Name | ||
| Typedefs: | ||
| - Name: MultiVersionedTypedef34 | ||
| SwiftName: MultiVersionedTypedef34_4 | ||
| - Name: MultiVersionedTypedef34Header | ||
| SwiftName: MultiVersionedTypedef34Header_4 | ||
| - Name: MultiVersionedTypedef34Notes | ||
| SwiftName: MultiVersionedTypedef34Notes_4 | ||
| - Name: MultiVersionedTypedef345 | ||
| SwiftName: MultiVersionedTypedef345_4 | ||
| - Name: MultiVersionedTypedef345Header | ||
| SwiftName: MultiVersionedTypedef345Header_4 | ||
| - Name: MultiVersionedTypedef345Notes | ||
| SwiftName: MultiVersionedTypedef345Notes_4 | ||
| - Name: MultiVersionedTypedef4 | ||
| SwiftName: MultiVersionedTypedef4_4 | ||
| - Name: MultiVersionedTypedef4Header | ||
| SwiftName: MultiVersionedTypedef4Header_4 | ||
| - Name: MultiVersionedTypedef4Notes | ||
| SwiftName: MultiVersionedTypedef4Notes_4 | ||
| - Name: MultiVersionedTypedef45 | ||
| SwiftName: MultiVersionedTypedef45_4 | ||
| - Name: MultiVersionedTypedef45Header | ||
| SwiftName: MultiVersionedTypedef45Header_4 | ||
| - Name: MultiVersionedTypedef45Notes | ||
| SwiftName: MultiVersionedTypedef45Notes_4 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| void moveToPointDUMP(double x, double y) __attribute__((swift_name("moveTo(x:y:)"))); | ||
|
|
||
| void unversionedRenameDUMP(void) __attribute__((swift_name("unversionedRename_HEADER()"))); | ||
|
|
||
| void acceptClosure(void (^ __attribute__((noescape)) block)(void)); | ||
|
|
||
| void privateFunc(void) __attribute__((swift_private)); | ||
|
|
||
| typedef double MyDoubleWrapper __attribute__((swift_wrapper(struct))); | ||
|
|
||
| #if __OBJC__ | ||
| @class NSString; | ||
|
|
||
| extern NSString *MyErrorDomain; | ||
|
|
||
| enum __attribute__((ns_error_domain(MyErrorDomain))) MyErrorCode { | ||
| MyErrorCodeFailed = 1 | ||
| }; | ||
|
|
||
| __attribute__((swift_bridge("MyValueType"))) | ||
| @interface MyReferenceType | ||
| @end | ||
|
|
||
| @interface TestProperties | ||
| @property (nonatomic, readwrite, retain) id accessorsOnly; | ||
| @property (nonatomic, readwrite, retain, class) id accessorsOnlyForClass; | ||
|
|
||
| @property (nonatomic, readwrite, retain) id accessorsOnlyInVersion3; | ||
| @property (nonatomic, readwrite, retain, class) id accessorsOnlyForClassInVersion3; | ||
|
|
||
| @property (nonatomic, readwrite, retain) id accessorsOnlyExceptInVersion3; | ||
| @property (nonatomic, readwrite, retain, class) id accessorsOnlyForClassExceptInVersion3; | ||
| @end | ||
|
|
||
| @interface Base | ||
| @end | ||
|
|
||
| @interface TestGenericDUMP<Element> : Base | ||
| - (Element)element; | ||
| @end | ||
|
|
||
| @interface Swift3RenamedOnlyDUMP | ||
| @end | ||
|
|
||
| __attribute__((swift_name("Swift4Name"))) | ||
| @interface Swift3RenamedAlsoDUMP | ||
| @end | ||
|
|
||
| @interface Swift4RenamedDUMP | ||
| @end | ||
|
|
||
| #endif | ||
|
|
||
|
|
||
| enum __attribute__((flag_enum)) FlagEnum { | ||
| FlagEnumA = 1, | ||
| FlagEnumB = 2 | ||
| }; | ||
|
|
||
| enum __attribute__((flag_enum)) NewlyFlagEnum { | ||
| NewlyFlagEnumA = 1, | ||
| NewlyFlagEnumB = 2 | ||
| }; | ||
|
|
||
| enum APINotedFlagEnum { | ||
| APINotedFlagEnumA = 1, | ||
| APINotedFlagEnumB = 2 | ||
| }; | ||
|
|
||
|
|
||
| enum __attribute__((enum_extensibility(open))) OpenEnum { | ||
| OpenEnumA = 1, | ||
| }; | ||
|
|
||
| enum __attribute__((enum_extensibility(open))) NewlyOpenEnum { | ||
| NewlyOpenEnumA = 1, | ||
| }; | ||
|
|
||
| enum __attribute__((enum_extensibility(closed))) NewlyClosedEnum { | ||
| NewlyClosedEnumA = 1, | ||
| }; | ||
|
|
||
| enum __attribute__((enum_extensibility(open))) ClosedToOpenEnum { | ||
| ClosedToOpenEnumA = 1, | ||
| }; | ||
|
|
||
| enum __attribute__((enum_extensibility(closed))) OpenToClosedEnum { | ||
| OpenToClosedEnumA = 1, | ||
| }; | ||
|
|
||
| enum APINotedOpenEnum { | ||
| APINotedOpenEnumA = 1, | ||
| }; | ||
|
|
||
| enum APINotedClosedEnum { | ||
| APINotedClosedEnumA = 1, | ||
| }; | ||
|
|
||
|
|
||
| enum SoonToBeCFEnum { | ||
| SoonToBeCFEnumA = 1 | ||
| }; | ||
| enum SoonToBeNSEnum { | ||
| SoonToBeNSEnumA = 1 | ||
| }; | ||
| enum SoonToBeCFOptions { | ||
| SoonToBeCFOptionsA = 1 | ||
| }; | ||
| enum SoonToBeNSOptions { | ||
| SoonToBeNSOptionsA = 1 | ||
| }; | ||
| enum SoonToBeCFClosedEnum { | ||
| SoonToBeCFClosedEnumA = 1 | ||
| }; | ||
| enum SoonToBeNSClosedEnum { | ||
| SoonToBeNSClosedEnumA = 1 | ||
| }; | ||
| enum UndoAllThatHasBeenDoneToMe { | ||
| UndoAllThatHasBeenDoneToMeA = 1 | ||
| } __attribute__((flag_enum)) __attribute__((enum_extensibility(closed))); | ||
|
|
||
|
|
||
| typedef int MultiVersionedTypedef4; | ||
| typedef int MultiVersionedTypedef4Notes; | ||
| typedef int MultiVersionedTypedef4Header __attribute__((swift_name("MultiVersionedTypedef4Header_NEW"))); | ||
|
|
||
| typedef int MultiVersionedTypedef34; | ||
| typedef int MultiVersionedTypedef34Notes; | ||
| typedef int MultiVersionedTypedef34Header __attribute__((swift_name("MultiVersionedTypedef34Header_NEW"))); | ||
|
|
||
| typedef int MultiVersionedTypedef45; | ||
| typedef int MultiVersionedTypedef45Notes; | ||
| typedef int MultiVersionedTypedef45Header __attribute__((swift_name("MultiVersionedTypedef45Header_NEW"))); | ||
|
|
||
| typedef int MultiVersionedTypedef345; | ||
| typedef int MultiVersionedTypedef345Notes; | ||
| typedef int MultiVersionedTypedef345Header __attribute__((swift_name("MultiVersionedTypedef345Header_NEW"))); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| framework module VersionedKit { | ||
| umbrella header "VersionedKit.h" | ||
| export * | ||
| module * { export * } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| Name: HeaderLib | ||
| SwiftInferImportAsMember: true | ||
| Functions: | ||
| - Name: custom_realloc | ||
| NullabilityOfRet: N | ||
| Nullability: [ N, S ] | ||
| - Name: unavailable_function | ||
| Availability: none | ||
| AvailabilityMsg: "I beg you not to use this" | ||
| - Name: do_something_with_pointers | ||
| NullabilityOfRet: O | ||
| Nullability: [ N, O ] | ||
|
|
||
| Globals: | ||
| - Name: global_int | ||
| Nullability: N | ||
| - Name: unavailable_global_int | ||
| Availability: none |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| Name: BrokenTypes | ||
| Functions: | ||
| - Name: break_me_function | ||
| ResultType: 'int * with extra junk' | ||
| Parameters: | ||
| - Position: 0 | ||
| Type: 'not_a_type' | ||
| Globals: | ||
| - Name: break_me_variable | ||
| Type: 'double' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #ifndef BROKEN_TYPES_H | ||
| #define BROKEN_TYPES_H | ||
|
|
||
| char break_me_function(void *ptr); | ||
|
|
||
| extern char break_me_variable; | ||
|
|
||
| #endif // BROKEN_TYPES_H |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| Name: ExternCtx | ||
| Globals: | ||
| - Name: globalInExternC | ||
| Availability: none | ||
| AvailabilityMsg: "oh no" | ||
| - Name: globalInExternCXX | ||
| Availability: none | ||
| AvailabilityMsg: "oh no #2" | ||
| Functions: | ||
| - Name: globalFuncInExternC | ||
| Availability: none | ||
| AvailabilityMsg: "oh no #3" | ||
| - Name: globalFuncInExternCXX | ||
| Availability: none | ||
| AvailabilityMsg: "oh no #4" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| extern "C" { | ||
| static int globalInExternC = 1; | ||
|
|
||
| static void globalFuncInExternC() {} | ||
| } | ||
|
|
||
| extern "C++" { | ||
| static int globalInExternCXX = 2; | ||
|
|
||
| static void globalFuncInExternCXX() {} | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| Name: HeaderLib | ||
| SwiftInferImportAsMember: true | ||
| Functions: | ||
| - Name: custom_realloc | ||
| NullabilityOfRet: N | ||
| Nullability: [ N, S ] | ||
| - Name: unavailable_function | ||
| Availability: none | ||
| AvailabilityMsg: "I beg you not to use this" | ||
| - Name: do_something_with_pointers | ||
| NullabilityOfRet: O | ||
| Nullability: [ N, O ] | ||
| - Name: do_something_with_arrays | ||
| Parameters: | ||
| - Position: 0 | ||
| Nullability: N | ||
| - Position: 1 | ||
| Nullability: N | ||
| - Name: take_pointer_and_int | ||
| Parameters: | ||
| - Position: 0 | ||
| Nullability: N | ||
| NoEscape: true | ||
| - Position: 1 | ||
| NoEscape: true | ||
| Globals: | ||
| - Name: global_int | ||
| Nullability: N | ||
| - Name: unavailable_global_int | ||
| Availability: none | ||
| Tags: | ||
| - Name: unavailable_struct | ||
| Availability: none | ||
|
|
||
| Typedefs: | ||
| - Name: unavailable_typedef | ||
| Availability: none |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #ifndef HEADER_LIB_H | ||
| #define HEADER_LIB_H | ||
|
|
||
| void *custom_realloc(void *member, unsigned size); | ||
|
|
||
| int *global_int; | ||
|
|
||
| int unavailable_function(void); | ||
| int unavailable_global_int; | ||
|
|
||
| void do_something_with_pointers(int *ptr1, int *ptr2); | ||
| void do_something_with_arrays(int simple[], int nested[][2]); | ||
|
|
||
| typedef int unavailable_typedef; | ||
| struct unavailable_struct { int x, y, z; }; | ||
|
|
||
| void take_pointer_and_int(int *ptr1, int value); | ||
|
|
||
| #endif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| Name: InstancetypeModule | ||
| Classes: | ||
| - Name: SomeBaseClass | ||
| Methods: | ||
| - Selector: instancetypeFactoryMethod | ||
| MethodKind: Class | ||
| ResultType: SomeBaseClass * _Nonnull | ||
| - Selector: staticFactoryMethod | ||
| MethodKind: Class | ||
| ResultType: SomeBaseClass * _Nonnull |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| @interface Object | ||
| @end | ||
|
|
||
| @interface SomeBaseClass : Object | ||
| + (nullable instancetype)instancetypeFactoryMethod; | ||
| + (nullable SomeBaseClass *)staticFactoryMethod; | ||
| @end | ||
|
|
||
| @interface SomeSubclass : SomeBaseClass | ||
| @end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| extern int ModuleWithWrongCase; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| extern int ModuleWithWrongCasePrivate; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Name: ModuleWithWrongCasePrivate |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Name: ModuleWithWrongCasePrivate |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| --- | ||
| Name: Namespaces | ||
| Globals: | ||
| - Name: varInInlineNamespace | ||
| SwiftName: swiftVarInInlineNamespace | ||
| Functions: | ||
| - Name: funcInNamespace | ||
| SwiftName: inWrongContext() | ||
| - Name: funcInInlineNamespace | ||
| SwiftName: swiftFuncInInlineNamespace() | ||
| Tags: | ||
| - Name: char_box | ||
| SwiftName: InWrongContext | ||
| Namespaces: | ||
| - Name: Namespace1 | ||
| Typedefs: | ||
| - Name: my_typedef | ||
| SwiftName: SwiftTypedef | ||
| - Name: my_using_decl | ||
| SwiftName: SwiftUsingDecl | ||
| Globals: | ||
| - Name: varInNamespace | ||
| SwiftName: swiftVarInNamespace | ||
| Functions: | ||
| - Name: funcInNamespace | ||
| SwiftName: swiftFuncInNamespace() | ||
| Tags: | ||
| - Name: char_box | ||
| SwiftName: CharBox | ||
| Namespaces: | ||
| - Name: Nested1 | ||
| Globals: | ||
| - Name: varInNestedNamespace | ||
| SwiftName: swiftVarInNestedNamespace | ||
| Functions: | ||
| - Name: funcInNestedNamespace | ||
| SwiftName: swiftFuncInNestedNamespace(_:) | ||
| Tags: | ||
| - Name: char_box | ||
| SwiftName: NestedCharBox | ||
| Namespaces: | ||
| - Name: Namespace1 | ||
| Tags: | ||
| - Name: char_box | ||
| SwiftName: DeepNestedCharBox | ||
| - Name: Nested2 | ||
| Globals: | ||
| - Name: varInNestedNamespace | ||
| SwiftName: swiftAnotherVarInNestedNamespace | ||
| - Name: InlineNamespace1 | ||
| Functions: | ||
| - Name: funcInInlineNamespace | ||
| SwiftName: shouldNotSpellOutInlineNamespaces() |