1 typedef int* _Nonnull mynonnull; 2 3 __attribute__((objc_root_class)) 4 @interface typedefClass 5 - (void) func1:(mynonnull)i; 6 @end 7 8 void func2(mynonnull i); 9 10 void func3(int *); // expected-warning{{pointer is missing a nullability type specifier}} 11 // expected-note@-1{{insert '_Nullable' if the pointer may be null}} 12 // expected-note@-2{{insert '_Nonnull' if the pointer should never be null}} 13 14 #define CF_RETURNS_NOT_RETAINED __attribute__((cf_returns_not_retained)) 15 typedef void *CFTypeRef; 16 void cf1(CFTypeRef * p CF_RETURNS_NOT_RETAINED); // expected-warning{{pointer is missing a nullability type specifier}} 17 // expected-note@-1{{insert '_Nullable' if the pointer may be null}} 18 // expected-note@-2{{insert '_Nonnull' if the pointer should never be null}} 19 20 void cf2(CFTypeRef * _Nullable p CF_RETURNS_NOT_RETAINED); 21 void cf3(CFTypeRef * _Nonnull p CF_RETURNS_NOT_RETAINED); 22 23 void cf4(CFTypeRef _Nullable * _Nullable p CF_RETURNS_NOT_RETAINED); 24 void cf5(CFTypeRef _Nonnull * _Nullable p CF_RETURNS_NOT_RETAINED); 25 26 void cf6(CFTypeRef * _Nullable CF_RETURNS_NOT_RETAINED p); 27 void cf7(CF_RETURNS_NOT_RETAINED CFTypeRef * _Nonnull p); 28 29 typedef CFTypeRef _Nullable *CFTypeRefPtr; 30 void cfp1(CFTypeRefPtr p CF_RETURNS_NOT_RETAINED); // expected-warning{{pointer is missing a nullability type specifier}} 31 // expected-note@-1{{insert '_Nullable' if the pointer may be null}} 32 // expected-note@-2{{insert '_Nonnull' if the pointer should never be null}} 33 void cfp2(CFTypeRefPtr _Nonnull p CF_RETURNS_NOT_RETAINED); 34