@@ -40,57 +40,57 @@ extern const int kRawInt;
40
40
extern void takesMyInt (MyInt );
41
41
42
42
typedef NSString * NSURLResourceKey __attribute((swift_newtype (struct )));
43
- extern NSURLResourceKey const NSURLIsRegularFileKey ;
44
- extern NSURLResourceKey const NSURLIsDirectoryKey ;
45
- extern NSURLResourceKey const NSURLLocalizedNameKey ;
43
+ extern _Null_unspecified NSURLResourceKey const NSURLIsRegularFileKey ;
44
+ extern _Null_unspecified NSURLResourceKey const NSURLIsDirectoryKey ;
45
+ extern _Null_unspecified NSURLResourceKey const NSURLLocalizedNameKey ;
46
46
47
47
// Special case: Notifications
48
- extern const NSString * FooNotification ;
49
- extern const NSString * kBarNotification ;
50
- extern const NSString * NSWibbleNotification ;
48
+ extern const NSString * _Null_unspecified FooNotification ;
49
+ extern const NSString * _Null_unspecified kBarNotification ;
50
+ extern const NSString * _Null_unspecified NSWibbleNotification ;
51
51
52
52
// But not just 'Notification'
53
- extern const NSString * kNotification ;
54
- extern const NSString * Notification ;
53
+ extern const NSString * _Null_unspecified kNotification ;
54
+ extern const NSString * _Null_unspecified Notification ;
55
55
56
56
// Nor when explicitly swift_name-ed
57
- extern const NSString * kSNNotification
57
+ extern const NSString * _Null_unspecified kSNNotification
58
58
__attribute((swift_name ("swiftNamedNotification" ))) ;
59
59
60
60
// Test CFStringRef
61
61
typedef CFStringRef CFNewType __attribute((swift_newtype (struct )));
62
62
63
63
// CF audited
64
64
_Pragma ("clang arc_cf_code_audited begin" )
65
- extern const CFNewType MyCFNewTypeValue ;
66
- extern CFNewType FooAudited (void );
65
+ extern _Null_unspecified const CFNewType MyCFNewTypeValue ;
66
+ extern _Null_unspecified CFNewType FooAudited (void );
67
67
_Pragma ("clang arc_cf_code_audited end" )
68
- extern const CFNewType MyCFNewTypeValueUnauditedButConst ;
68
+ extern _Null_unspecified const CFNewType MyCFNewTypeValueUnauditedButConst ;
69
69
70
70
// un-audited CFStringRef
71
- extern CFNewType MyCFNewTypeValueUnaudited ;
72
- extern CFNewType FooUnaudited (void );
71
+ extern _Null_unspecified CFNewType MyCFNewTypeValueUnaudited ;
72
+ extern _Null_unspecified CFNewType FooUnaudited (void );
73
73
74
74
// Tests to show identical calling convention / binary representation for
75
75
// new_type and non-new_type
76
76
typedef CFStringRef MyABINewType __attribute((swift_newtype (struct )));
77
77
typedef CFStringRef MyABIOldType ;
78
78
_Pragma ("clang arc_cf_code_audited begin" )
79
- extern const MyABINewType kMyABINewTypeGlobal ;
80
- extern const MyABIOldType kMyABIOldTypeGlobal ;
81
- extern MyABINewType getMyABINewType (void );
82
- extern MyABIOldType getMyABIOldType (void );
83
- extern void takeMyABINewType (MyABINewType );
84
- extern void takeMyABIOldType (MyABIOldType );
79
+ extern _Null_unspecified const MyABINewType kMyABINewTypeGlobal ;
80
+ extern _Null_unspecified const MyABIOldType kMyABIOldTypeGlobal ;
81
+ extern _Null_unspecified MyABINewType getMyABINewType (void );
82
+ extern _Null_unspecified MyABIOldType getMyABIOldType (void );
83
+ extern void takeMyABINewType (_Null_unspecified MyABINewType );
84
+ extern void takeMyABIOldType (_Null_unspecified MyABIOldType );
85
85
86
86
extern void takeMyABINewTypeNonNull (_Nonnull MyABINewType );
87
87
extern void takeMyABIOldTypeNonNull (_Nonnull MyABIOldType );
88
88
_Pragma ("clang arc_cf_code_audited end" )
89
89
90
90
typedef NSString * MyABINewTypeNS __attribute((swift_newtype (struct )));
91
91
typedef NSString * MyABIOldTypeNS ;
92
- extern MyABINewTypeNS getMyABINewTypeNS (void );
93
- extern MyABIOldTypeNS getMyABIOldTypeNS (void );
92
+ extern _Null_unspecified MyABINewTypeNS getMyABINewTypeNS (void );
93
+ extern _Null_unspecified MyABIOldTypeNS getMyABIOldTypeNS (void );
94
94
extern void takeMyABINewTypeNonNullNS (_Nonnull MyABINewTypeNS );
95
95
extern void takeMyABIOldTypeNonNullNS (_Nonnull MyABIOldTypeNS );
96
96
@@ -100,31 +100,31 @@ typedef struct {int i;} NSSomeContext;
100
100
typedef NSString * NSSomeContextName __attribute((swift_newtype (struct )))
101
101
__attribute((swift_name ("NSSomeContext.Name" )));
102
102
103
- extern const NSSomeContextName NSMyContextName ;
103
+ extern _Null_unspecified const NSSomeContextName NSMyContextName ;
104
104
105
105
typedef struct T * TRef __attribute((swift_newtype (struct )));
106
106
typedef const struct T * ConstTRef __attribute((swift_newtype (struct )));
107
107
extern _Nonnull TRef create_T (void );
108
108
extern _Nonnull ConstTRef create_ConstT (void );
109
- extern void destroy_T (TRef );
110
- extern void destroy_ConstT (ConstTRef );
109
+ extern void destroy_T (_Null_unspecified TRef );
110
+ extern void destroy_ConstT (_Null_unspecified ConstTRef );
111
111
112
- extern void mutate_TRef_Pointee (TRef ) __attribute((swift_name ("TRef.mutatePointee(self:)" )));
113
- extern void mutate_TRef (TRef * ) __attribute((swift_name ("TRef.mutate(self:)" )));
114
- extern void use_ConstT (ConstTRef )
112
+ extern void mutate_TRef_Pointee (_Null_unspecified TRef ) __attribute((swift_name ("TRef.mutatePointee(self:)" )));
113
+ extern void mutate_TRef (_Null_unspecified TRef * _Null_unspecified ) __attribute((swift_name ("TRef.mutate(self:)" )));
114
+ extern void use_ConstT (_Null_unspecified ConstTRef )
115
115
__attribute((swift_name ("ConstTRef.use(self:)" )));
116
116
117
117
typedef struct T * _Nonnull * TRefRef __attribute((swift_newtype (struct )));
118
118
typedef struct T * _Nonnull const * ConstTRefRef
119
119
__attribute((swift_newtype (struct )));
120
120
extern _Nonnull TRefRef create_TRef (void );
121
121
extern _Nonnull ConstTRefRef create_ConstTRef (void );
122
- extern void destroy_TRef (TRefRef );
123
- extern void destroy_ConstTRef (ConstTRefRef );
122
+ extern void destroy_TRef (_Null_unspecified TRefRef );
123
+ extern void destroy_ConstTRef (_Null_unspecified ConstTRefRef );
124
124
125
- extern void mutate_TRefRef_Pointee (TRefRef )
125
+ extern void mutate_TRefRef_Pointee (_Null_unspecified TRefRef )
126
126
__attribute((swift_name ("TRefRef.mutatePointee(self:)" )));
127
- extern void mutate_TRefRef (TRefRef * )
127
+ extern void mutate_TRefRef (_Null_unspecified TRefRef * _Null_unspecified )
128
128
__attribute((swift_name ("TRefRef.mutate(self:)" )));
129
- extern void use_ConstTRef (ConstTRefRef )
129
+ extern void use_ConstTRef (_Null_unspecified ConstTRefRef )
130
130
__attribute((swift_name ("ConstTRefRef.use(self:)" )));
0 commit comments