[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Frontend / rewrite-includes.c
blob7cca01c11e585f1e6ed3f26cbcb5afdedf428493
1 // RUN: %clang_cc1 -E -frewrite-includes -DFIRST -I %S/Inputs -I %S/Inputs/NextIncludes %s -o - | FileCheck -strict-whitespace %s
2 // RUN: %clang_cc1 -E -frewrite-includes -P -DFIRST -I %S/Inputs -I %S/Inputs/NextIncludes %s -o - | FileCheck -check-prefix=CHECKNL -strict-whitespace %s
3 // RUN: %clang_cc1 -E -frewrite-includes -DFIRST -I %S/Inputs -I %S/Inputs/NextIncludes %s -o - | %clang_cc1 -Wall -Wextra -Wconversion -DFIRST -x c -fsyntax-only 2>&1 | FileCheck -check-prefix=COMPILE --implicit-check-not warning: %s
4 // STARTCOMPARE
5 #define A(a,b) a ## b
6 A(in,t) a;
7 #include "rewrite-includes1.h"
8 #ifdef FIRST
9 #define HEADER "rewrite-includes3.h"
10 #include HEADER
11 #else
12 #include "rewrite-includes4.h"
13 #endif
14 // indented
15 #/**/include /**/ "rewrite-includes5.h" /**/ \
17 #include "rewrite-includes6.h" // comment
19 #include "rewrite-includes6.h" /* comment
20 continues */
21 #include "rewrite-includes7.h"
22 #include "rewrite-includes7.h"
23 #include "rewrite-includes8.h"
24 #include "rewrite-includes9.h"
25 static int unused;
26 // ENDCOMPARE
27 // CHECK: {{^}}# 1 "{{.*}}rewrite-includes.c"{{$}}
28 // CHECK: {{^}}// STARTCOMPARE{{$}}
29 // CHECK-NEXT: {{^}}#define A(a,b) a ## b{{$}}
30 // CHECK-NEXT: {{^}}A(in,t) a;{{$}}
31 // CHECK-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) /* rewrite-includes1.h expanded by -frewrite-includes */{{$}}
32 // CHECK-NEXT: {{^}}#include "rewrite-includes1.h"{{$}}
33 // CHECK-NEXT: {{^}}#else /* rewrite-includes1.h expanded by -frewrite-includes */{{$}}
34 // CHECK-NEXT: {{^}}# 7 "{{.*}}rewrite-includes.c"{{$}}
35 // CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes1.h" 1{{$}}
36 // CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
37 // CHECK-NEXT: {{^}}#pragma clang system_header{{$}}
38 // CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
39 // CHECK-NEXT: {{^}}# 2 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes1.h" 3{{$}}
40 // CHECK-NEXT: {{^}}int included_line1;{{$}}
41 // CHECK-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* rewrite-includes2.h expanded by -frewrite-includes */{{$}}
42 // CHECK-NEXT: {{^}}#include "rewrite-includes2.h"{{$}}
43 // CHECK-NEXT: {{^}}#else /* rewrite-includes2.h expanded by -frewrite-includes */{{$}}
44 // CHECK-NEXT: {{^}}# 3 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes1.h" 3{{$}}
45 // CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes2.h" 1 3{{$}}
46 // CHECK-NEXT: {{^}}int included_line2;{{$}}
47 // CHECK-NEXT: {{^}}#endif /* rewrite-includes2.h expanded by -frewrite-includes */{{$}}
48 // CHECK-NEXT: {{^}}# 4 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes1.h" 2 3{{$}}
49 // CHECK-NEXT: {{^}}#endif /* rewrite-includes1.h expanded by -frewrite-includes */{{$}}
50 // CHECK-NEXT: {{^}}# 8 "{{.*}}rewrite-includes.c" 2{{$}}
51 // CHECK-NEXT: {{^}}#ifdef FIRST{{$}}
52 // CHECK-NEXT: {{^}}#define HEADER "rewrite-includes3.h"{{$}}
53 // CHECK-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) /* rewrite-includes3.h expanded by -frewrite-includes */{{$}}
54 // CHECK-NEXT: {{^}}#include HEADER{{$}}
55 // CHECK-NEXT: {{^}}#else /* rewrite-includes3.h expanded by -frewrite-includes */{{$}}
56 // CHECK-NEXT: {{^}}# 10 "{{.*}}rewrite-includes.c"{{$}}
57 // CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes3.h" 1{{$}}
58 // CHECK-NEXT: {{^}}unsigned int included_line3 = -10;{{$}}
59 // CHECK-NEXT: {{^}}#endif /* rewrite-includes3.h expanded by -frewrite-includes */{{$}}
60 // CHECK-NEXT: {{^}}# 11 "{{.*}}rewrite-includes.c" 2{{$}}
61 // CHECK-NEXT: {{^}}#else{{$}}
62 // CHECK-NEXT: {{^}}# 12 "{{.*}}rewrite-includes.c"{{$}}
63 // CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
64 // CHECK-NEXT: {{^}}#include "rewrite-includes4.h"{{$}}
65 // CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
66 // CHECK-NEXT: {{^}}# 12 "{{.*}}rewrite-includes.c"{{$}}
67 // CHECK-NEXT: {{^}}# 13 "{{.*}}rewrite-includes.c"{{$}}
68 // CHECK-NEXT: {{^}}#endif{{$}}
69 // CHECK-NEXT: {{^}}# 14 "{{.*}}rewrite-includes.c"{{$}}
70 // CHECK-NEXT: {{^}} // indented{{$}}
71 // CHECK-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) /* rewrite-includes5.h expanded by -frewrite-includes */{{$}}
72 // CHECK-NEXT: {{^}}#/**/include /**/ "rewrite-includes5.h" /**/ {{\\}}{{$}}
73 // CHECK-NEXT: {{^}} {{$}}
74 // CHECK-NEXT: {{^}}#else /* rewrite-includes5.h expanded by -frewrite-includes */{{$}}
75 // CHECK-NEXT: {{^}}# 16 "{{.*}}rewrite-includes.c"{{$}}
76 // CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes5.h" 1{{$}}
77 // CHECK-NEXT: {{^}}int included_line5;{{$}}
78 // CHECK-NEXT: {{^}}#endif /* rewrite-includes5.h expanded by -frewrite-includes */{{$}}
79 // CHECK-NEXT: {{^}}# 17 "{{.*}}rewrite-includes.c" 2{{$}}
80 // CHECK-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) /* rewrite-includes6.h expanded by -frewrite-includes */{{$}}
81 // CHECK-NEXT: {{^}}#include "rewrite-includes6.h" // comment{{$}}
82 // CHECK-NEXT: {{^}}#else /* rewrite-includes6.h expanded by -frewrite-includes */{{$}}
83 // CHECK-NEXT: {{^}}# 17 "{{.*}}rewrite-includes.c"{{$}}
84 // CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes6.h" 1{{$}}
85 // CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
86 // CHECK-NEXT: {{^}}#pragma once{{$}}
87 // CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
88 // CHECK-NEXT: {{^}}# 2 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes6.h"{{$}}
89 // CHECK-NEXT: {{^}}int included_line6;{{$}}
90 // CHECK-NEXT: {{^}}#endif /* rewrite-includes6.h expanded by -frewrite-includes */{{$}}
91 // CHECK-NEXT: {{^}}# 18 "{{.*}}rewrite-includes.c" 2{{$}}
92 // CHECK-NEXT: {{^}} {{$}}
93 // CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
94 // CHECK-NEXT: {{^}}#include "rewrite-includes6.h" /* comment{{$}}
95 // CHECK-NEXT: {{^}} continues */{{$}}
96 // CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
97 // CHECK-NEXT: {{^}}# 20 "{{.*}}rewrite-includes.c"{{$}}
98 // CHECK-NEXT: {{^}}# 21 "{{.*}}rewrite-includes.c"{{$}}
99 // CHECK-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) /* rewrite-includes7.h expanded by -frewrite-includes */{{$}}
100 // CHECK-NEXT: {{^}}#include "rewrite-includes7.h"{{$}}
101 // CHECK-NEXT: {{^}}#else /* rewrite-includes7.h expanded by -frewrite-includes */{{$}}
102 // CHECK-NEXT: {{^}}# 21 "{{.*}}rewrite-includes.c"{{$}}
103 // CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes7.h" 1{{$}}
104 // CHECK-NEXT: {{^}}#ifndef REWRITE_INCLUDES_7{{$}}
105 // CHECK-NEXT: {{^}}#define REWRITE_INCLUDES_7{{$}}
106 // CHECK-NEXT: {{^}}int included_line7;{{$}}
107 // CHECK-NEXT: {{^}}#endif{{$}}
108 // CHECK-NEXT: {{^}}# 5 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes7.h"{{$}}
109 // CHECK-NEXT: {{^}}#endif /* rewrite-includes7.h expanded by -frewrite-includes */{{$}}
110 // CHECK-NEXT: {{^}}# 22 "{{.*}}rewrite-includes.c" 2{{$}}
111 // CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
112 // CHECK-NEXT: {{^}}#include "rewrite-includes7.h"{{$}}
113 // CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
114 // CHECK-NEXT: {{^}}# 22 "{{.*}}rewrite-includes.c"{{$}}
115 // CHECK-NEXT: {{^}}# 23 "{{.*}}rewrite-includes.c"{{$}}
116 // CHECK-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) /* rewrite-includes8.h expanded by -frewrite-includes */{{$}}
117 // CHECK-NEXT: {{^}}#include "rewrite-includes8.h"{{$}}
118 // CHECK-NEXT: {{^}}#else /* rewrite-includes8.h expanded by -frewrite-includes */{{$}}
119 // CHECK-NEXT: {{^}}# 23 "{{.*}}rewrite-includes.c"{{$}}
120 // CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes8.h" 1{{$}}
121 // CHECK-NEXT: {{^}}#if 0 /* disabled by -frewrite-includes */{{$}}
122 // CHECK-NEXT: {{^}}#if __has_include_next(<rewrite-includes8.h>){{$}}
123 // CHECK-NEXT: {{^}}#endif{{$}}
124 // CHECK-NEXT: {{^}}#endif /* disabled by -frewrite-includes */{{$}}
125 // CHECK-NEXT: {{^}}#if 0 /* evaluated by -frewrite-includes */{{$}}
126 // CHECK-NEXT: {{^}}# 2 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes8.h"{{$}}
127 // CHECK-NEXT: {{^}}#if 0 /* disabled by -frewrite-includes */{{$}}
128 // CHECK-NEXT: {{^}}#if 0{{$}}
129 // CHECK-NEXT: {{^}}#elif __has_include(<rewrite-includes8.hfail>){{$}}
130 // CHECK-NEXT: {{^}}#endif{{$}}
131 // CHECK-NEXT: {{^}}#endif /* disabled by -frewrite-includes */{{$}}
132 // CHECK-NEXT: {{^}}#elif 0 /* evaluated by -frewrite-includes */{{$}}
133 // CHECK-NEXT: {{^}}# 3 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes8.h"{{$}}
134 // CHECK-NEXT: {{^}}#endif{{$}}
135 // CHECK-NEXT: {{^}}# 4 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes8.h"{{$}}
136 // CHECK-NEXT: {{^}}#if 0 /* disabled by -frewrite-includes */{{$}}
137 // CHECK-NEXT: {{^}}#if !__has_include("rewrite-includes8.h"){{$}}
138 // CHECK-NEXT: {{^}}#endif{{$}}
139 // CHECK-NEXT: {{^}}#endif /* disabled by -frewrite-includes */{{$}}
140 // CHECK-NEXT: {{^}}#if 0 /* evaluated by -frewrite-includes */{{$}}
141 // CHECK-NEXT: {{^}}# 5 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes8.h"{{$}}
142 // CHECK-NEXT: {{^}}#endif{{$}}
143 // CHECK-NEXT: {{^}}# 6 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes8.h"{{$}}
144 // CHECK-NEXT: {{^}}#endif /* rewrite-includes8.h expanded by -frewrite-includes */{{$}}
145 // CHECK-NEXT: {{^}}# 24 "{{.*}}rewrite-includes.c" 2{{$}}
146 // CHECK-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) /* rewrite-includes9.h expanded by -frewrite-includes */{{$}}
147 // CHECK-NEXT: {{^}}#include "rewrite-includes9.h"{{$}}
148 // CHECK-NEXT: {{^}}#else /* rewrite-includes9.h expanded by -frewrite-includes */{{$}}
149 // CHECK-NEXT: {{^}}# 24 "{{.*}}rewrite-includes.c"{{$}}
150 // CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes9.h" 1{{$}}
151 // CHECK-NEXT: {{^}}#if 0 /* disabled by -frewrite-includes */{{$}}
152 // CHECK-NEXT: {{^}}#if __has_include_next(<rewrite-includes9.h>){{$}}
153 // CHECK-NEXT: {{^}}#endif{{$}}
154 // CHECK-NEXT: {{^}}#endif /* disabled by -frewrite-includes */{{$}}
155 // CHECK-NEXT: {{^}}#if 1 /* evaluated by -frewrite-includes */{{$}}
156 // CHECK-NEXT: {{^}}# 2 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes9.h"{{$}}
157 // CHECK-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) /* rewrite-includes9.h expanded by -frewrite-includes */{{$}}
158 // CHECK-NEXT: {{^}}#include_next <rewrite-includes9.h>{{$}}
159 // CHECK-NEXT: {{^}}#else /* rewrite-includes9.h expanded by -frewrite-includes */{{$}}
160 // CHECK-NEXT: {{^}}# 2 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes9.h"{{$}}
161 // CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)NextIncludes(/|\\\\)}}rewrite-includes9.h" 1{{$}}
162 // CHECK-NEXT: {{^}}int included_line9;{{$}}
163 // CHECK-NEXT: {{^}}#endif /* rewrite-includes9.h expanded by -frewrite-includes */{{$}}
164 // CHECK-NEXT: {{^}}# 3 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes9.h" 2{{$}}
165 // CHECK-NEXT: {{^}}#endif{{$}}
166 // CHECK-NEXT: {{^}}# 4 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes9.h"{{$}}
167 // CHECK-NEXT: {{^}}#endif /* rewrite-includes9.h expanded by -frewrite-includes */{{$}}
168 // CHECK-NEXT: {{^}}# 25 "{{.*}}rewrite-includes.c" 2{{$}}
169 // CHECK-NEXT: {{^}}static int unused;{{$}}
170 // CHECK-NEXT: {{^}}// ENDCOMPARE{{$}}
172 // CHECKNL: {{^}}// STARTCOMPARE{{$}}
173 // CHECKNL-NEXT: {{^}}#define A(a,b) a ## b{{$}}
174 // CHECKNL-NEXT: {{^}}A(in,t) a;{{$}}
175 // CHECKNL-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) /* rewrite-includes1.h expanded by -frewrite-includes */{{$}}
176 // CHECKNL-NEXT: {{^}}#include "rewrite-includes1.h"{{$}}
177 // CHECKNL-NEXT: {{^}}#else /* rewrite-includes1.h expanded by -frewrite-includes */{{$}}
178 // CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
179 // CHECKNL-NEXT: {{^}}#pragma clang system_header{{$}}
180 // CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
181 // CHECKNL-NEXT: {{^}}int included_line1;{{$}}
182 // CHECKNL-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* rewrite-includes2.h expanded by -frewrite-includes */{{$}}
183 // CHECKNL-NEXT: {{^}}#include "rewrite-includes2.h"{{$}}
184 // CHECKNL-NEXT: {{^}}#else /* rewrite-includes2.h expanded by -frewrite-includes */{{$}}
185 // CHECKNL-NEXT: {{^}}int included_line2;{{$}}
186 // CHECKNL-NEXT: {{^}}#endif /* rewrite-includes2.h expanded by -frewrite-includes */{{$}}
187 // CHECKNL-NEXT: {{^}}#endif /* rewrite-includes1.h expanded by -frewrite-includes */{{$}}
188 // CHECKNL-NEXT: {{^}}#ifdef FIRST{{$}}
189 // CHECKNL-NEXT: {{^}}#define HEADER "rewrite-includes3.h"{{$}}
190 // CHECKNL-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) /* rewrite-includes3.h expanded by -frewrite-includes */{{$}}
191 // CHECKNL-NEXT: {{^}}#include HEADER{{$}}
192 // CHECKNL-NEXT: {{^}}#else /* rewrite-includes3.h expanded by -frewrite-includes */{{$}}
193 // CHECKNL-NEXT: {{^}}unsigned int included_line3 = -10;{{$}}
194 // CHECKNL-NEXT: {{^}}#endif /* rewrite-includes3.h expanded by -frewrite-includes */{{$}}
195 // CHECKNL-NEXT: {{^}}#else{{$}}
196 // CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
197 // CHECKNL-NEXT: {{^}}#include "rewrite-includes4.h"{{$}}
198 // CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
199 // CHECKNL-NEXT: {{^}}#endif{{$}}
200 // CHECKNL-NEXT: {{^}} // indented{{$}}
201 // CHECKNL-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) /* rewrite-includes5.h expanded by -frewrite-includes */{{$}}
202 // CHECKNL-NEXT: {{^}}#/**/include /**/ "rewrite-includes5.h" /**/ {{\\}}{{$}}
203 // CHECKNL-NEXT: {{^}} {{$}}
204 // CHECKNL-NEXT: {{^}}#else /* rewrite-includes5.h expanded by -frewrite-includes */{{$}}
205 // CHECKNL-NEXT: {{^}}int included_line5;{{$}}
206 // CHECKNL-NEXT: {{^}}#endif /* rewrite-includes5.h expanded by -frewrite-includes */{{$}}
207 // CHECKNL-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) /* rewrite-includes6.h expanded by -frewrite-includes */{{$}}
208 // CHECKNL-NEXT: {{^}}#include "rewrite-includes6.h" // comment{{$}}
209 // CHECKNL-NEXT: {{^}}#else /* rewrite-includes6.h expanded by -frewrite-includes */{{$}}
210 // CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
211 // CHECKNL-NEXT: {{^}}#pragma once{{$}}
212 // CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
213 // CHECKNL-NEXT: {{^}}int included_line6;{{$}}
214 // CHECKNL-NEXT: {{^}}#endif /* rewrite-includes6.h expanded by -frewrite-includes */{{$}}
215 // CHECKNL-NEXT: {{^}} {{$}}
216 // CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
217 // CHECKNL-NEXT: {{^}}#include "rewrite-includes6.h" /* comment{{$}}
218 // CHECKNL-NEXT: {{^}} continues */{{$}}
219 // CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
220 // CHECKNL-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) /* rewrite-includes7.h expanded by -frewrite-includes */{{$}}
221 // CHECKNL-NEXT: {{^}}#include "rewrite-includes7.h"{{$}}
222 // CHECKNL-NEXT: {{^}}#else /* rewrite-includes7.h expanded by -frewrite-includes */{{$}}
223 // CHECKNL-NEXT: {{^}}#ifndef REWRITE_INCLUDES_7{{$}}
224 // CHECKNL-NEXT: {{^}}#define REWRITE_INCLUDES_7{{$}}
225 // CHECKNL-NEXT: {{^}}int included_line7;{{$}}
226 // CHECKNL-NEXT: {{^}}#endif{{$}}
227 // CHECKNL-NEXT: {{^}}#endif /* rewrite-includes7.h expanded by -frewrite-includes */{{$}}
228 // CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
229 // CHECKNL-NEXT: {{^}}#include "rewrite-includes7.h"{{$}}
230 // CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
231 // CHECKNL-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) /* rewrite-includes8.h expanded by -frewrite-includes */{{$}}
232 // CHECKNL-NEXT: {{^}}#include "rewrite-includes8.h"{{$}}
233 // CHECKNL-NEXT: {{^}}#else /* rewrite-includes8.h expanded by -frewrite-includes */{{$}}
234 // CHECKNL-NEXT: {{^}}#if 0 /* disabled by -frewrite-includes */{{$}}
235 // CHECKNL-NEXT: {{^}}#if __has_include_next(<rewrite-includes8.h>){{$}}
236 // CHECKNL-NEXT: {{^}}#endif{{$}}
237 // CHECKNL-NEXT: {{^}}#endif /* disabled by -frewrite-includes */{{$}}
238 // CHECKNL-NEXT: {{^}}#if 0 /* evaluated by -frewrite-includes */{{$}}
239 // CHECKNL-NEXT: {{^}}#if 0 /* disabled by -frewrite-includes */{{$}}
240 // CHECKNL-NEXT: {{^}}#if 0{{$}}
241 // CHECKNL-NEXT: {{^}}#elif __has_include(<rewrite-includes8.hfail>){{$}}
242 // CHECKNL-NEXT: {{^}}#endif{{$}}
243 // CHECKNL-NEXT: {{^}}#endif /* disabled by -frewrite-includes */{{$}}
244 // CHECKNL-NEXT: {{^}}#elif 0 /* evaluated by -frewrite-includes */{{$}}
245 // CHECKNL-NEXT: {{^}}#endif{{$}}
246 // CHECKNL-NEXT: {{^}}#if 0 /* disabled by -frewrite-includes */{{$}}
247 // CHECKNL-NEXT: {{^}}#if !__has_include("rewrite-includes8.h"){{$}}
248 // CHECKNL-NEXT: {{^}}#endif{{$}}
249 // CHECKNL-NEXT: {{^}}#endif /* disabled by -frewrite-includes */{{$}}
250 // CHECKNL-NEXT: {{^}}#if 0 /* evaluated by -frewrite-includes */{{$}}
251 // CHECKNL-NEXT: {{^}}#endif{{$}}
252 // CHECKNL-NEXT: {{^}}#endif /* rewrite-includes8.h expanded by -frewrite-includes */{{$}}
253 // CHECKNL-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) /* rewrite-includes9.h expanded by -frewrite-includes */{{$}}
254 // CHECKNL-NEXT: {{^}}#include "rewrite-includes9.h"{{$}}
255 // CHECKNL-NEXT: {{^}}#else /* rewrite-includes9.h expanded by -frewrite-includes */{{$}}
256 // CHECKNL-NEXT: {{^}}#if 0 /* disabled by -frewrite-includes */{{$}}
257 // CHECKNL-NEXT: {{^}}#if __has_include_next(<rewrite-includes9.h>){{$}}
258 // CHECKNL-NEXT: {{^}}#endif{{$}}
259 // CHECKNL-NEXT: {{^}}#endif /* disabled by -frewrite-includes */{{$}}
260 // CHECKNL-NEXT: {{^}}#if 1 /* evaluated by -frewrite-includes */{{$}}
261 // CHECKNL-NEXT: {{^}}#if defined(__CLANG_REWRITTEN_INCLUDES) /* rewrite-includes9.h expanded by -frewrite-includes */{{$}}
262 // CHECKNL-NEXT: {{^}}#include_next <rewrite-includes9.h>{{$}}
263 // CHECKNL-NEXT: {{^}}#else /* rewrite-includes9.h expanded by -frewrite-includes */{{$}}
264 // CHECKNL-NEXT: {{^}}int included_line9;{{$}}
265 // CHECKNL-NEXT: {{^}}#endif /* rewrite-includes9.h expanded by -frewrite-includes */{{$}}
266 // CHECKNL-NEXT: {{^}}#endif{{$}}
267 // CHECKNL-NEXT: {{^}}#endif /* rewrite-includes9.h expanded by -frewrite-includes */{{$}}
268 // CHECKNL-NEXT: {{^}}static int unused;{{$}}
269 // CHECKNL-NEXT: {{^}}// ENDCOMPARE{{$}}
271 // COMPILE: Inputs{{[/\\]}}rewrite-includes3.h:1:31: warning: implicit conversion changes signedness:
272 // COMPILE: rewrite-includes.c:25:12: warning: unused variable 'unused'