2015-06-25 06:02:08 +08:00
|
|
|
void g1(int * _Nonnull);
|
2015-06-20 02:27:45 +08:00
|
|
|
|
|
|
|
void g2(int (^block)(int, int)); // expected-warning{{block pointer is missing a nullability type specifier}}
|
2016-12-20 04:58:20 +08:00
|
|
|
// expected-note@-1 {{insert '_Nullable' if the block pointer may be null}}
|
|
|
|
// expected-note@-2 {{insert '_Nonnull' if the block pointer should never be null}}
|
2015-06-20 02:27:45 +08:00
|
|
|
|
|
|
|
void g3(const
|
|
|
|
id // expected-warning{{missing a nullability type specifier}}
|
2016-12-20 04:58:20 +08:00
|
|
|
// expected-note@-1 {{insert '_Nullable' if the pointer may be null}}
|
|
|
|
// expected-note@-2 {{insert '_Nonnull' if the pointer should never be null}}
|
2015-06-20 02:27:45 +08:00
|
|
|
volatile
|
|
|
|
* // expected-warning{{missing a nullability type specifier}}
|
2016-12-20 04:58:20 +08:00
|
|
|
// expected-note@-1 {{insert '_Nullable' if the pointer may be null}}
|
|
|
|
// expected-note@-2 {{insert '_Nonnull' if the pointer should never be null}}
|
2015-06-20 02:27:45 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
@interface SomeClass
|
|
|
|
@property (retain,nonnull) id property1;
|
|
|
|
@property (retain,nullable) SomeClass *property2;
|
|
|
|
- (nullable SomeClass *)method1;
|
|
|
|
- (void)method2:(nonnull SomeClass *)param;
|
2015-10-10 04:36:17 +08:00
|
|
|
@property (readonly, weak) SomeClass *property3; // expected-warning{{missing a nullability type specifier}}
|
2016-12-20 04:58:20 +08:00
|
|
|
// expected-note@-1 {{insert '_Nullable' if the pointer may be null}}
|
|
|
|
// expected-note@-2 {{insert '_Nonnull' if the pointer should never be null}}
|
2015-10-10 04:36:17 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface SomeClass ()
|
|
|
|
@property (readonly, weak) SomeClass *property4; // expected-warning{{missing a nullability type specifier}}
|
2016-12-20 04:58:20 +08:00
|
|
|
// expected-note@-1 {{insert '_Nullable' if the pointer may be null}}
|
|
|
|
// expected-note@-2 {{insert '_Nonnull' if the pointer should never be null}}
|
2015-06-20 02:27:45 +08:00
|
|
|
@end
|