Lines Matching +full:- +full:werror
1 // Note: %s and %S must be preceded by --, otherwise it may be interpreted as a
2 // command-line option, e.g. on Mac where %s is commonly under /Users.
5 // RUN: %clang_cl -Werror /Ycpchfile.h /FIpchfile.h /c -### -- %s 2>&1 \
6 // RUN: | FileCheck -check-prefix=CHECK-YC %s
8 // CHECK-YC: cc1
9 // CHECK-YC: -emit-pch
10 // CHECK-YC: -o
11 // CHECK-YC: pchfile.pch
12 // CHECK-YC: -x
13 // CHECK-YC: "c++"
15 // CHECK-YC: cc1
16 // CHECK-YC: -emit-obj
17 // CHECK-YC: -include-pch
18 // CHECK-YC: pchfile.pch
22 // RUN: %clang_cl -Werror /Fomyobj.obj /Ycpchfile.h /FIpchfile.h /c -### -- %s 2>&1 \
23 // RUN: | FileCheck -check-prefix=CHECK-YCO %s
25 // CHECK-YCO: cc1
26 // CHECK-YCO: -emit-pch
27 // CHECK-YCO: -o
28 // CHECK-YCO: pchfile.pch
30 // CHECK-YCO: cc1
31 // CHECK-YCO: -emit-obj
32 // CHECK-YCO: -include-pch
33 // CHECK-YCO: pchfile.pch
34 // CHECK-YCO: -o
35 // CHECK-YCO: myobj.obj
37 // /Yc /Y-
38 // /Y- disables pch generation
39 // RUN: %clang_cl -Werror /Y- /Ycpchfile.h /FIpchfile.h /c -### -- %s 2>&1 \
40 // RUN: | FileCheck -check-prefix=CHECK-YC-Y_ %s
41 // CHECK-YC-Y_-NOT: -emit-pch
42 // CHECK-YC-Y_-NOT: -include-pch
45 // RUN: %clang_cl -Werror /Yupchfile.h /FIpchfile.h /c -### -- %s 2>&1 \
46 // RUN: | FileCheck -check-prefix=CHECK-YU %s
48 // CHECK-YU-NOT: -emit-pch
49 // CHECK-YU: cc1
50 // CHECK-YU: -emit-obj
51 // CHECK-YU: -include-pch
52 // CHECK-YU: pchfile.pch
54 // /Yu /Y-
55 // RUN: %clang_cl -Werror /Y- /Yupchfile.h /FIpchfile.h /c -### -- %s 2>&1 \
56 // RUN: | FileCheck -check-prefix=CHECK-YU-Y_ %s
57 // CHECK-YU-Y_-NOT: -emit-pch
58 // CHECK-YU-Y_-NOT: -include-pch
60 // /Yc /Yu -- /Yc overrides /Yc if they both refer to the same file
61 // RUN: %clang_cl -Werror /Ycpchfile.h /Yupchfile.h /FIpchfile.h /c -### -- %s 2>&1 \
62 // RUN: | FileCheck -check-prefix=CHECK-YC-YU %s
64 // CHECK-YC-YU: cc1
65 // CHECK-YC-YU: -emit-pch
66 // CHECK-YC-YU: -o
67 // CHECK-YC-YU: pchfile.pch
69 // CHECK-YC-YU: cc1
70 // CHECK-YC-YU: -emit-obj
71 // CHECK-YC-YU: -include-pch
72 // CHECK-YC-YU: pchfile.pch
76 // RUN: %clang_cl -Werror /Ycfoo1.h /Yufoo2.h /FIfoo1.h /FIfoo2.h /c -### -- %s 2>&1 \
77 // RUN: | FileCheck -check-prefix=CHECK-YC-YU-MISMATCH %s
78 // CHECK-YC-YU-MISMATCH: error: support for '/Yc' and '/Yu' with different filenames not implemente…
81 // RUN: %clang_cl -Werror /Ycfoo1.h /FIfoo1.h /c -### -- %s %s 2>&1 \
82 // RUN: | FileCheck -check-prefix=CHECK-YC-MULTIINPUT %s
83 // CHECK-YC-MULTIINPUT: error: support for '/Yc' with more than one source file not implemented yet…
85 // /Yc /Yu /Y-
86 // RUN: %clang_cl -Werror /Ycpchfile.h /Yupchfile.h /FIpchfile.h /Y- /c -### -- %s 2>&1 \
87 // RUN: | FileCheck -check-prefix=CHECK-YC-YU-Y_ %s
88 // CHECK-YC-YU-Y_-NOT: -emit-pch
89 // CHECK-YC-YU-Y_-NOT: -include-pch
94 // RUN: %clang_cl -Werror /Yupchfile.h /FIpchfile.h /Fpout.pch /c -### -- %s 2>&1 \
95 // RUN: | FileCheck -check-prefix=CHECK-YUFP1 %s
97 // CHECK-YUFP1: -include-pch
98 // CHECK-YUFP1: out.pch
101 // RUN: %clang_cl -Werror /Yupchfile.h /FIpchfile.h /Fpout.pch /c -### -- %s 2>&1 \
102 // RUN: | FileCheck -check-prefix=CHECK-YUFP2 %s
104 // CHECK-YUFP2: -include-pch
105 // CHECK-YUFP2: out.pch
108 // RUN: %clang_cl -Werror /Yupchfile.h /FIpchfile.h /Fpout.bmp /c -### -- %s 2>&1 \
109 // RUN: | FileCheck -check-prefix=CHECK-YUFP3 %s
111 // CHECK-YUFP3: -include-pch
112 // CHECK-YUFP3: out.bmp
115 // RUN: %clang_cl -Werror /Yusub/pchfile.h /FIsub/pchfile.h /c -### -- %s 2>&1 \
116 // RUN: | FileCheck -check-prefix=CHECK-YUFP4 %s
118 // CHECK-YUFP4: -include-pch
119 // CHECK-YUFP4: sub/pchfile.pch
122 // RUN: %clang_cl -Werror /Yupchfile.h /FIpchfile.h /Isub /c -### -- %s 2>&1 \
123 // RUN: | FileCheck -check-prefix=CHECK-YUFP5 %s
125 // CHECK-YUFP5: -include-pch
126 // CHECK-YUFP5: pchfile.pch
131 // Spot-check one use of /Fp with /Yc too, else trust the /Yu test cases above
133 // RUN: %clang_cl -Werror /Ycpchfile.h /FIpchfile.h /Fpsub/file.pch /c -### -- %s 2>&1 \
134 // RUN: | FileCheck -check-prefix=CHECK-YCFP %s
136 // CHECK-YCFP: cc1
137 // CHECK-YCFP: -emit-pch
138 // CHECK-YCFP: -o
139 // CHECK-YCFP: sub/file.pch
141 // CHECK-YCFP: cc1
142 // CHECK-YCFP: -emit-obj
143 // CHECK-YCFP: -include-pch
144 // CHECK-YCFP: sub/file.pch
149 // RUN: %clang_cl -Werror /Ycfoo2.h /FIfoo1.h /FIfoo2.h /FIfoo3.h /c -### -- %s 2>&1 \
150 // RUN: | FileCheck -check-prefix=CHECK-YCFIFIFI %s
152 // CHECK-YCFIFIFI: cc1
153 // CHECK-YCFIFIFI: -emit-pch
154 // CHECK-YCFIFIFI: -include
155 // CHECK-YCFIFIFI: foo1.h
156 // CHECK-YCFIFIFI-NOT: foo2.h
157 // CHECK-YCFIFIFI-NOT: foo3.h
158 // CHECK-YCFIFIFI: -o
159 // CHECK-YCFIFIFI: foo2.pch
160 // CHECK-YCFIFIFI: -x
161 // CHECK-YCFIFIFI: "c++"
162 // CHECK-YCFIFIFI: foo2.h
164 // CHECK-YCFIFIFI: cc1
165 // CHECK-YCFIFIFI: -emit-obj
166 // CHECK-YCFIFIFI-NOT: foo1.h
167 // CHECK-YCFIFIFI-NOT: foo2.h
168 // CHECK-YCFIFIFI: -include-pch
169 // CHECK-YCFIFIFI: foo2.pch
170 // CHECK-YCFIFIFI: -include
171 // CHECK-YCFIFIFI: foo3.h
175 // RUN: %clang_cl -Werror /Yufoo2.h /FIfoo1.h /FIfoo2.h /FIfoo3.h /c -### -- %s 2>&1 \
176 // RUN: | FileCheck -check-prefix=CHECK-YUFIFIFI %s
178 // CHECK-YUFIFIFI-NOT: -emit-pch
179 // CHECK-YUFIFIFI: cc1
180 // CHECK-YUFIFIFI: -emit-obj
181 // CHECK-YUFIFIFI-NOT: foo1.h
182 // CHECK-YUFIFIFI-NOT: foo2.h
183 // CHECK-YUFIFIFI: -include-pch
184 // CHECK-YUFIFIFI: foo2.pch
185 // CHECK-YUFIFIFI: -include
186 // CHECK-YUFIFIFI: foo3.h
189 // RUN: %clang_cl -Werror /Ycfoo.h /c -### -- %s 2>&1 \
190 // RUN: | FileCheck -check-prefix=CHECK-YC-NOFI %s
191 // CHECK-YC-NOFI: error: support for '/Yc' without a corresponding /FI flag not implemented yet; fl…
192 // RUN: %clang_cl -Werror /Yufoo.h /c -### -- %s 2>&1 \
193 // RUN: | FileCheck -check-prefix=CHECK-YU-NOFI %s
194 // CHECK-YU-NOFI: error: support for '/Yu' without a corresponding /FI flag not implemented yet; fl…
205 // RUN: %clang_cl -Werror /Ycpchfile.h /FI./pchfile.h /c -### -- %s 2>&1 \
206 // RUN: | FileCheck -check-prefix=CHECK-YC-I1 %s
207 // CHECK-YC-I1: support for '/Yc' without a corresponding /FI flag not implemented yet; flag ignored
210 // RUN: %clang_cl -Werror /Yc./pchfile.h /FIpchfile.h /c -### -- %s 2>&1 \
211 // RUN: | FileCheck -check-prefix=CHECK-YC-I2 %s
212 // CHECK-YC-I2: support for '/Yc' without a corresponding /FI flag not implemented yet; flag ignored
215 // RUN: %clang_cl -Werror /Ifoo /Ycpchfile.h /FIpchfile.h /c -### -- %s 2>&1 \
216 // RUN: | FileCheck -check-prefix=CHECK-YC-I3 %s
219 // CHECK-YC-I3: cc1
220 // CHECK-YC-I3: -emit-pch
221 // CHECK-YC-I3: -o
222 // CHECK-YC-I3: pchfile.pch
224 // CHECK-YC-I3: cc1
225 // CHECK-YC-I3: -emit-obj
226 // CHECK-YC-I3: -include-pch
227 // CHECK-YC-I3: pchfile.pch
230 // RUN: %clang_cl -Werror /Yupchfile.h /FI./pchfile.h /c -### -- %s 2>&1 \
231 // RUN: | FileCheck -check-prefix=CHECK-YU-I1 %s
232 // CHECK-YU-I1: support for '/Yu' without a corresponding /FI flag not implemented yet; flag ignored
237 // RUN: %clang_cl -Werror /YupchFILE.h /FI./pchfile.h /c -### -- %s 2>&1 \
238 // RUN: | FileCheck -check-prefix=CHECK-YU-CASE %s
239 // CHECK-YU-CASE: support for '/Yu' without a corresponding /FI flag not implemented yet; flag igno…
240 // RUN: %clang_cl -Werror /Yu./pchfile.h /FI.\pchfile.h /c -### -- %s 2>&1 \
241 // RUN: | FileCheck -check-prefix=CHECK-YU-SLASH %s
242 // CHECK-YU-SLASH: support for '/Yu' without a corresponding /FI flag not implemented yet; flag ign…
244 // cl.exe warns on multiple /Yc, /Yu, /Fp arguments, but clang-cl silently just
246 // is self-consistent with clang-cl's flag handling.
251 // RUN: %clang_cl -Werror /Ycpchfile.h /FIpchfile.h /Fpfoo.pch /fallback /c -### -- %s 2>&1 \
252 // RUN: | FileCheck -check-prefix=CHECK-YC-FALLBACK %s
255 // CHECK-YC-FALLBACK: cc1
256 // CHECK-YC-FALLBACK: -emit-obj
257 // CHECK-YC-FALLBACK: -include-pch
258 // CHECK-YC-FALLBACK: foo.pch
259 // CHECK-YC-FALLBACK: ||
260 // CHECK-YC-FALLBACK: cl.exe
261 // CHECK-YC-FALLBACK-NOT: -include-pch
262 // CHECK-YC-FALLBACK-NOT: /Ycpchfile.h
263 // CHECK-YC-FALLBACK: /FIpchfile.h
264 // CHECK-YC-FALLBACK-NOT: /Fpfoo.pch
267 // RUN: %clang_cl -Werror /Yupchfile.h /FIpchfile.h /Fpfoo.pch /fallback /c -### -- %s 2>&1 \
268 // RUN: | FileCheck -check-prefix=CHECK-YU-FALLBACK %s
269 // CHECK-YU-FALLBACK-NOT: -emit-pch
270 // CHECK-YU-FALLBACK: cc1
271 // CHECK-YU-FALLBACK: -emit-obj
272 // CHECK-YU-FALLBACK: -include-pch
273 // CHECK-YU-FALLBACK: foo.pch
274 // CHECK-YU-FALLBACK: ||
275 // CHECK-YU-FALLBACK: cl.exe
276 // CHECK-YU-FALLBACK-NOT: -include-pch
277 // CHECK-YU-FALLBACK-NOT: /Yupchfile.h
278 // CHECK-YU-FALLBACK: /FIpchfile.h
279 // CHECK-YU-FALLBACK-NOT: /Fpfoo.pch
282 // -include, which picks up .gch files if they exist).
284 // RUN: %clang_cl -Werror /FI%t.pch /Fp%t.pch /c -### -- %s 2>&1 \
285 // RUN: | FileCheck -check-prefix=CHECK-FI %s
286 // CHECK-FI-NOT: -include-pch
287 // CHECK-FI: -include
292 // RUN: %clang_cl /TC -Werror /Ycpchfile.h /FIpchfile.h /c -### -- %s 2>&1 \
293 // RUN: | FileCheck -check-prefix=CHECK-YCTC %s
294 // CHECK-YCTC: cc1
295 // CHECK-YCTC: -emit-pch
296 // CHECK-YCTC: -o
297 // CHECK-YCTC: pchfile.pch
298 // CHECK-YCTC: -x
299 // CHECK-YCTC: "c"
301 // Also check lower-case /Tc variant.
302 // RUN: %clang_cl -Werror /Ycpchfile.h /FIpchfile.h /c -### /Tc%s 2>&1 \
303 // RUN: | FileCheck -check-prefix=CHECK-YCTc %s
304 // CHECK-YCTc: cc1
305 // CHECK-YCTc: -emit-pch
306 // CHECK-YCTc: -o
307 // CHECK-YCTc: pchfile.pch
308 // CHECK-YCTc: -x
309 // CHECK-YCTc: "c"
311 // Don't crash when a non-source file is passed.
312 // RUN: %clang_cl -Werror /Ycpchfile.h /FIpchfile.h /c -### -- %S/Inputs/file.prof 2>&1 \
313 // RUN: | FileCheck -check-prefix=CHECK-NoSource %s
314 // CHECK-NoSource: file.prof:{{.*}}input unused
317 // RUN: %clang_cl /TP -Werror /Ycpchfile.h /FIpchfile.h /c -### -- %S/Inputs/file.prof 2>&1 \
318 // RUN: | FileCheck -check-prefix=CHECK-NoSourceTP %s
319 // CHECK-NoSourceTP: cc1
320 // CHECK-NoSourceTP: -emit-pch
321 // CHECK-NoSourceTP: -o
322 // CHECK-NoSourceTP: pchfile.pch
323 // CHECK-NoSourceTP: -x
324 // CHECK-NoSourceTP: "c++"