Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / FixIt / Inputs / nullability-objc.h
blob38c8508946fe69e062f44785ee4ec10a82d09a01
1 @class Item;
2 @class Container<ObjectType>;
3 @protocol Protocol;
5 // The first pointer in the file is handled in a different way so need
6 // a separate test for this case even if the parameter type is the same as in
7 // objcIdParameterWithProtocol.
8 void objcIdParameterWithProtocolFirstInFile(id<Protocol> i); // expected-warning {{pointer is missing a nullability type specifier}}
9 // expected-note@-1 {{insert '_Nullable'}}
10 // expected-note@-2 {{insert '_Nonnull'}}
11 // CHECK: fix-it:"{{.*}}nullability-objc.h":{[[@LINE-3]]:57-[[@LINE-3]]:57}:" _Nullable"
12 // CHECK: fix-it:"{{.*}}nullability-objc.h":{[[@LINE-4]]:57-[[@LINE-4]]:57}:" _Nonnull"
14 int * _Nonnull forceNullabilityWarningsObjC(void);
16 void objcClassParameter(Item *i); // expected-warning {{pointer is missing a nullability type specifier}}
17 // expected-note@-1 {{insert '_Nullable'}}
18 // expected-note@-2 {{insert '_Nonnull'}}
19 // CHECK: fix-it:"{{.*}}nullability-objc.h":{[[@LINE-3]]:31-[[@LINE-3]]:31}:" _Nullable "
20 // CHECK: fix-it:"{{.*}}nullability-objc.h":{[[@LINE-4]]:31-[[@LINE-4]]:31}:" _Nonnull "
22 void objcClassParameterWithProtocol(Item<Protocol> *i); // expected-warning {{pointer is missing a nullability type specifier}}
23 // expected-note@-1 {{insert '_Nullable'}}
24 // expected-note@-2 {{insert '_Nonnull'}}
25 // CHECK: fix-it:"{{.*}}nullability-objc.h":{[[@LINE-3]]:53-[[@LINE-3]]:53}:" _Nullable "
26 // CHECK: fix-it:"{{.*}}nullability-objc.h":{[[@LINE-4]]:53-[[@LINE-4]]:53}:" _Nonnull "
28 void objcIdParameterWithProtocol(id<Protocol> i); // expected-warning {{pointer is missing a nullability type specifier}}
29 // expected-note@-1 {{insert '_Nullable'}}
30 // expected-note@-2 {{insert '_Nonnull'}}
31 // CHECK: fix-it:"{{.*}}nullability-objc.h":{[[@LINE-3]]:46-[[@LINE-3]]:46}:" _Nullable"
32 // CHECK: fix-it:"{{.*}}nullability-objc.h":{[[@LINE-4]]:46-[[@LINE-4]]:46}:" _Nonnull"
34 // Class parameters don't have nullability type specifier.
35 void objcParameterizedClassParameter(Container<Item *> *c); // expected-warning {{pointer is missing a nullability type specifier}}
36 // expected-note@-1 {{insert '_Nullable'}}
37 // expected-note@-2 {{insert '_Nonnull'}}
38 // CHECK: fix-it:"{{.*}}nullability-objc.h":{[[@LINE-3]]:57-[[@LINE-3]]:57}:" _Nullable "
39 // CHECK: fix-it:"{{.*}}nullability-objc.h":{[[@LINE-4]]:57-[[@LINE-4]]:57}:" _Nonnull "
41 // Class parameters don't have nullability type specifier.
42 void objcParameterizedClassParameterWithProtocol(Container<id<Protocol>> *c); // expected-warning {{pointer is missing a nullability type specifier}}
43 // expected-note@-1 {{insert '_Nullable'}}
44 // expected-note@-2 {{insert '_Nonnull'}}
45 // CHECK: fix-it:"{{.*}}nullability-objc.h":{[[@LINE-3]]:75-[[@LINE-3]]:75}:" _Nullable "
46 // CHECK: fix-it:"{{.*}}nullability-objc.h":{[[@LINE-4]]:75-[[@LINE-4]]:75}:" _Nonnull "