4 __attribute__((objc_root_class))
5 #ifndef NS_ASSUME_NONNULL_BEGIN
6 #if __has_feature(assume_nonnull)
7 #define NS_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
8 #define NS_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
10 #define NS_ASSUME_NONNULL_BEGIN
11 #define NS_ASSUME_NONNULL_END
15 NS_ASSUME_NONNULL_BEGIN
18 -(null_unspecified A*)transform:(null_unspecified A*)input __attribute__((unavailable("anything but this")));
19 -(A*)transform:(A*)input integer:(int)integer;
21 @property (null_unspecified, nonatomic, readonly, retain) A* someA;
22 @property (null_unspecified, nonatomic, retain) A* someOtherA;
24 @property (nonatomic) int intValue __attribute__((unavailable("wouldn't work anyway")));
30 __attribute__((unavailable("just don't")))
35 - (instancetype)init; // expected-warning{{pointer is missing a nullability type specifier}}
36 // expected-note@-1{{insert '_Nullable' if the pointer may be null}}
37 // expected-note@-2{{insert '_Nonnull' if the pointer should never be null}}
38 - (instancetype)initWithA:( A*)a __attribute__((objc_designated_initializer)); // expected-warning 2{{pointer is missing a nullability type specifier}}
39 // expected-note@-1 2{{insert '_Nullable' if the pointer may be null}}
40 // expected-note@-2 2{{insert '_Nonnull' if the pointer should never be null}}