[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaObjCXX / Inputs / nullability-consistency-2.h
blob6d767998fd5b957feb0080e59d903ad1f7904cc2
1 void g1(int * _Nonnull);
3 void g2(int (^block)(int, int)); // expected-warning{{block pointer is missing a nullability type specifier}}
4 // expected-note@-1 {{insert '_Nullable' if the block pointer may be null}}
5 // expected-note@-2 {{insert '_Nonnull' if the block pointer should never be null}}
7 void g3(const
8 id // expected-warning{{missing a nullability type specifier}}
9 volatile
10 // expected-note@-1 {{insert '_Nullable' if the pointer may be null}}
11 // expected-note@-2 {{insert '_Nonnull' if the pointer should never be null}}
12 * // expected-warning{{missing a nullability type specifier}}
13 // expected-note@-1 {{insert '_Nullable' if the pointer may be null}}
14 // expected-note@-2 {{insert '_Nonnull' if the pointer should never be null}}
15 );
17 @interface SomeClass
18 @property (retain,nonnull) id property1;
19 @property (retain,nullable) SomeClass *property2;
20 - (nullable SomeClass *)method1;
21 - (void)method2:(nonnull SomeClass *)param;
22 @property (readonly, weak) SomeClass *property3;
23 @end
25 @interface SomeClass ()
26 @property (readonly, weak) SomeClass *property4;
27 @end