[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Index / retain-excluded-conditional-blocks.m
blobf90f0392347efd6a2bd46680b53bc852c295d153
1 // RUN: c-index-test -retain-excluded-conditional-blocks %s | FileCheck %s
3 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=MyCls
4 @interface MyCls
5 // CHECK: [[@LINE+1]]:8: ObjCInstanceMethodDecl=some_meth
6 -(void)some_meth;
7 @end
9 #if 1
10 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test1
11 @interface Test1 @end
12 #else
13 // CHECK: [[@LINE+1]]:12:
14 @interface Test2 @end
15 #endif
17 #if 0
18 // CHECK: [[@LINE+1]]:12:
19 @interface Test3 @end
20 #else
21 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test4
22 @interface Test4 @end
23 #endif
25 #if SOMETHING_NOT_DEFINED
26 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test5
27 @interface Test5 @end
28 #else
29 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test6
30 @interface Test6 @end
31 #endif
33 #define SOMETHING_DEFINED 1
34 #if SOMETHING_DEFINED
35 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test7
36 @interface Test7 @end
37 #else
38 // CHECK: [[@LINE+1]]:12:
39 @interface Test8 @end
40 #endif
42 #if defined(SOMETHING_NOT_DEFINED)
43 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test9
44 @interface Test9 @end
45 #else
46 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test10
47 @interface Test10 @end
48 #endif
50 #if defined(SOMETHING_DEFINED)
51 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test11
52 @interface Test11 @end
53 #else
54 // CHECK: [[@LINE+1]]:12:
55 @interface Test12 @end
56 #endif
58 #if SOMETHING_NOT_DEFINED1
59 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test13
60 @interface Test13 @end
61 #elif SOMETHING_NOT_DEFINED2
62 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test14
63 @interface Test14 @end
64 #else
65 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test15
66 @interface Test15 @end
67 #endif
69 #ifdef SOMETHING_NOT_DEFINED
70 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test19
71 @interface Test19 @end
72 #else
73 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test20
74 @interface Test20 @end
75 #endif
77 #ifdef SOMETHING_DEFINED
78 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test21
79 @interface Test21 @end
80 #else
81 // CHECK: [[@LINE+1]]:12:
82 @interface Test22 @end
83 #endif
85 #ifndef SOMETHING_NOT_DEFINED
86 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test23
87 @interface Test23 @end
88 #else
89 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test24
90 @interface Test24 @end
91 #endif
93 #ifndef SOMETHING_DEFINED
94 // CHECK: [[@LINE+1]]:12:
95 @interface Test25 @end
96 #else
97 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test26
98 @interface Test26 @end
99 #endif
101 #if 1 < SOMETHING_NOT_DEFINED
102 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test27
103 @interface Test27 @end
104 #else
105 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test28
106 @interface Test28 @end
107 #endif
109 #if SOMETHING_NOT_DEFINED
110 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test29
111 @interface Test29 @end
112 #endif
114 #ifdef SOMETHING_NOT_DEFINED
115 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test30
116 @interface Test30 @end
117 #endif
119 #ifdef SOMETHING_DEFINED
120 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test31
121 @interface Test31 @end
122 #elif !defined(SOMETHING_NOT_DEFINED)
123 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test32
124 @interface Test32 @end
125 #else
126 // CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test33
127 @interface Test33 @end
128 #endif