[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaObjCXX / Inputs / nullability-consistency-6.h
blobe9b2f9b13b46fc4caf284a4071f521a2bdfe9523
1 int *ptr; // expected-warning {{missing a nullability type specifier}}
2 // expected-note@-1{{insert '_Nullable' if the pointer may be null}}
3 // expected-note@-2{{insert '_Nonnull' if the pointer should never be null}}
4 #pragma clang assume_nonnull begin
6 extern void **blah; // expected-warning 2{{missing a nullability type specifier}}
7 // expected-note@-1 2 {{insert '_Nullable' if the pointer may be null}}
8 // expected-note@-2 2 {{insert '_Nonnull' if the pointer should never be null}}
10 __attribute__((objc_root_class))
11 @interface ClassWithWeakProperties
12 @property (readonly, weak) ClassWithWeakProperties *prop1;
13 @property (readonly, weak, null_unspecified) ClassWithWeakProperties *prop2;
14 @end
16 @interface ClassWithWeakProperties ()
17 @property (readonly, weak) ClassWithWeakProperties *prop3;
18 @end
20 #pragma clang assume_nonnull end