[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaObjCXX / Inputs / nullability-pragmas-generics-1.h
blob9a51fa1e9903e43b4876261e4efa72ccea5912f1
1 #pragma clang assume_nonnull begin
3 __attribute__((objc_root_class))
4 @interface B
5 @end
7 @interface C : B
8 @end
10 __attribute__((objc_root_class))
11 @interface NSGeneric<T : B *> // expected-note{{type parameter 'T' declared here}}
12 - (T)tee;
13 - (nullable T)maybeTee;
14 @end
16 typedef NSGeneric<C *> *Generic_with_C;
18 #pragma clang assume_nonnull end
20 @interface NSGeneric<T : C *>(Blah) // expected-error{{type bound 'C *' for type parameter 'T' conflicts with previous bound 'B *'}}
21 @end