• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: c-index-test -retain-excluded-conditional-blocks %s | FileCheck %s
2
3#include <stdint.h>
4
5// CHECK: TypedefDecl=intptr_t
6
7// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=MyCls
8@interface MyCls
9// CHECK: [[@LINE+1]]:8: ObjCInstanceMethodDecl=some_meth
10-(void)some_meth;
11@end
12
13#if 1
14// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test1
15@interface Test1 @end
16#else
17// CHECK: [[@LINE+1]]:12:
18@interface Test2 @end
19#endif
20
21#if 0
22// CHECK: [[@LINE+1]]:12:
23@interface Test3 @end
24#else
25// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test4
26@interface Test4 @end
27#endif
28
29#if SOMETHING_NOT_DEFINED
30// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test5
31@interface Test5 @end
32#else
33// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test6
34@interface Test6 @end
35#endif
36
37#define SOMETHING_DEFINED 1
38#if SOMETHING_DEFINED
39// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test7
40@interface Test7 @end
41#else
42// CHECK: [[@LINE+1]]:12:
43@interface Test8 @end
44#endif
45
46#if defined(SOMETHING_NOT_DEFINED)
47// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test9
48@interface Test9 @end
49#else
50// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test10
51@interface Test10 @end
52#endif
53
54#if defined(SOMETHING_DEFINED)
55// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test11
56@interface Test11 @end
57#else
58// CHECK: [[@LINE+1]]:12:
59@interface Test12 @end
60#endif
61
62#if SOMETHING_NOT_DEFINED1
63// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test13
64@interface Test13 @end
65#elif SOMETHING_NOT_DEFINED2
66// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test14
67@interface Test14 @end
68#else
69// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test15
70@interface Test15 @end
71#endif
72
73#ifdef SOMETHING_NOT_DEFINED
74// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test19
75@interface Test19 @end
76#else
77// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test20
78@interface Test20 @end
79#endif
80
81#ifdef SOMETHING_DEFINED
82// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test21
83@interface Test21 @end
84#else
85// CHECK: [[@LINE+1]]:12:
86@interface Test22 @end
87#endif
88
89#ifndef SOMETHING_NOT_DEFINED
90// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test23
91@interface Test23 @end
92#else
93// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test24
94@interface Test24 @end
95#endif
96
97#ifndef SOMETHING_DEFINED
98// CHECK: [[@LINE+1]]:12:
99@interface Test25 @end
100#else
101// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test26
102@interface Test26 @end
103#endif
104
105#if 1 < SOMETHING_NOT_DEFINED
106// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test27
107@interface Test27 @end
108#else
109// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test28
110@interface Test28 @end
111#endif
112
113#if SOMETHING_NOT_DEFINED
114// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test29
115@interface Test29 @end
116#endif
117
118#ifdef SOMETHING_NOT_DEFINED
119// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test30
120@interface Test30 @end
121#endif
122
123#ifdef SOMETHING_DEFINED
124// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test31
125@interface Test31 @end
126#elif !defined(SOMETHING_NOT_DEFINED)
127// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test32
128@interface Test32 @end
129#else
130// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test33
131@interface Test33 @end
132#endif
133