• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:prefix

1 // Note: %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.
7 // RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=c %s
8 // c: -c
10 // RUN: %clang_cl /C -### -- %s 2>&1 | FileCheck -check-prefix=C %s
11 // C: error: invalid argument '-C' only allowed with '/E, /P or /EP'
13 // RUN: %clang_cl /C /P -### -- %s 2>&1 | FileCheck -check-prefix=C_P %s
14 // C_P: "-E"
15 // C_P: "-C"
18 // RUN: -### -- %s 2>&1 | FileCheck -check-prefix=D %s
19 // D: "-D" "foo=bar"
20 // D: "-D" "bar=baz"
21 // D: "-D" "MYDEF=value"
22 // D: "-D" "MYDEF2=foo#bar"
23 // D: "-D" "MYDEF3=a=b"
24 // D: "-D" "MYDEF4="
26 // RUN: %clang_cl /E -### -- %s 2>&1 | FileCheck -check-prefix=E %s
27 // E: "-E"
28 // E: "-o" "-"
30 // RUN: %clang_cl /EP -### -- %s 2>&1 | FileCheck -check-prefix=EP %s
31 // EP: "-E"
32 // EP: "-P"
33 // EP: "-o" "-"
35 // RUN: %clang_cl /fp:fast /fp:except -### -- %s 2>&1 | FileCheck -check-prefix=fpexcept %s
36 // fpexcept-NOT: -menable-unsafe-fp-math
38 // RUN: %clang_cl /fp:fast /fp:except /fp:except- -### -- %s 2>&1 | FileCheck -check-prefix=fpexcep…
39 // fpexcept_: -menable-unsafe-fp-math
41 // RUN: %clang_cl /fp:precise /fp:fast -### -- %s 2>&1 | FileCheck -check-prefix=fpfast %s
42 // fpfast: -menable-unsafe-fp-math
43 // fpfast: -ffast-math
45 // RUN: %clang_cl /fp:fast /fp:precise -### -- %s 2>&1 | FileCheck -check-prefix=fpprecise %s
46 // fpprecise-NOT: -menable-unsafe-fp-math
47 // fpprecise-NOT: -ffast-math
49 // RUN: %clang_cl /fp:fast /fp:strict -### -- %s 2>&1 | FileCheck -check-prefix=fpstrict %s
50 // fpstrict-NOT: -menable-unsafe-fp-math
51 // fpstrict-NOT: -ffast-math
53 // RUN: %clang_cl /GA -### -- %s 2>&1 | FileCheck -check-prefix=GA %s
54 // GA: -ftls-model=local-exec
57 // RUN: %clang_cl /Zs /GR -- %s 2>&1
59 // RUN: %clang_cl /GR- -### -- %s 2>&1 | FileCheck -check-prefix=GR_ %s
60 // GR_: -fno-rtti
63 // RUN: %clang_cl -### -- %s 2>&1 | FileCheck -check-prefix=GS-default %s
64 // GS-default: "-stack-protector" "2"
66 // RUN: %clang_cl /GS -### -- %s 2>&1 | FileCheck -check-prefix=GS %s
67 // GS: "-stack-protector" "2"
69 // RUN: %clang_cl /GS- -### -- %s 2>&1 | FileCheck -check-prefix=GS_ %s
70 // GS_-NOT: -stack-protector
72 // RUN: %clang_cl /Gy -### -- %s 2>&1 | FileCheck -check-prefix=Gy %s
73 // Gy: -ffunction-sections
75 // RUN: %clang_cl /Gy /Gy- -### -- %s 2>&1 | FileCheck -check-prefix=Gy_ %s
76 // Gy_-NOT: -ffunction-sections
78 // RUN: %clang_cl /Gs -### -- %s 2>&1 | FileCheck -check-prefix=Gs %s
79 // Gs: "-mstack-probe-size=0"
80 // RUN: %clang_cl /Gs0 -### -- %s 2>&1 | FileCheck -check-prefix=Gs0 %s
81 // Gs0: "-mstack-probe-size=0"
82 // RUN: %clang_cl /Gs4096 -### -- %s 2>&1 | FileCheck -check-prefix=Gs4096 %s
83 // Gs4096: "-mstack-probe-size=4096"
85 // RUN: %clang_cl /Gw -### -- %s 2>&1 | FileCheck -check-prefix=Gw %s
86 // Gw: -fdata-sections
88 // RUN: %clang_cl /Gw /Gw- -### -- %s 2>&1 | FileCheck -check-prefix=Gw_ %s
89 // Gw_-NOT: -fdata-sections
91 // RUN: %clang_cl /Imyincludedir -### -- %s 2>&1 | FileCheck -check-prefix=SLASH_I %s
92 // RUN: %clang_cl /I myincludedir -### -- %s 2>&1 | FileCheck -check-prefix=SLASH_I %s
93 // SLASH_I: "-I" "myincludedir"
95 // RUN: %clang_cl /imsvcmyincludedir -### -- %s 2>&1 | FileCheck -check-prefix=SLASH_imsvc %s
96 // RUN: %clang_cl /imsvc myincludedir -### -- %s 2>&1 | FileCheck -check-prefix=SLASH_imsvc %s
98 // SLASH_imsvc: "-internal-isystem" "{{[^"]*}}lib{{(64)?/|\\\\}}clang{{[^"]*}}include"
99 // SLASH_imsvc: "-internal-isystem" "myincludedir"
101 // RUN: %clang_cl /J -### -- %s 2>&1 | FileCheck -check-prefix=J %s
102 // J: -fno-signed-char
104 // RUN: %clang_cl /Ofoo -### -- %s 2>&1 | FileCheck -check-prefix=O %s
107 // RUN: %clang_cl /Ob0 -### -- %s 2>&1 | FileCheck -check-prefix=Ob0 %s
108 // Ob0: -fno-inline
110 // RUN: %clang_cl /Ob2 -### -- %s 2>&1 | FileCheck -check-prefix=Ob2 %s
111 // RUN: %clang_cl /Odb2 -### -- %s 2>&1 | FileCheck -check-prefix=Ob2 %s
112 // RUN: %clang_cl /O2 /Ob2 -### -- %s 2>&1 | FileCheck -check-prefix=Ob2 %s
113 // Ob2-NOT: warning: argument unused during compilation: '/O2'
114 // Ob2: -finline-functions
116 // RUN: %clang_cl /Ob1 -### -- %s 2>&1 | FileCheck -check-prefix=Ob1 %s
117 // RUN: %clang_cl /Odb1 -### -- %s 2>&1 | FileCheck -check-prefix=Ob1 %s
118 // Ob1: -finline-hint-functions
120 // RUN: %clang_cl /Od -### -- %s 2>&1 | FileCheck -check-prefix=Od %s
121 // Od: -O0
123 // RUN: %clang_cl /Oi- /Oi -### -- %s 2>&1 | FileCheck -check-prefix=Oi %s
124 // Oi-NOT: -fno-builtin
126 // RUN: %clang_cl /Oi- -### -- %s 2>&1 | FileCheck -check-prefix=Oi_ %s
127 // Oi_: -fno-builtin
129 // RUN: %clang_cl /Os --target=i686-pc-windows-msvc -### -- %s 2>&1 | FileCheck -check-prefix=Os %s
130 // RUN: %clang_cl /Os --target=x86_64-pc-windows-msvc -### -- %s 2>&1 | FileCheck -check-prefix=Os …
131 // Os-NOT: -mdisable-fp-elim
132 // Os: -momit-leaf-frame-pointer
133 // Os: -Os
135 // RUN: %clang_cl /Ot --target=i686-pc-windows-msvc -### -- %s 2>&1 | FileCheck -check-prefix=Ot %s
136 // RUN: %clang_cl /Ot --target=x86_64-pc-windows-msvc -### -- %s 2>&1 | FileCheck -check-prefix=Ot …
137 // Ot-NOT: -mdisable-fp-elim
138 // Ot: -momit-leaf-frame-pointer
139 // Ot: -O2
141 // RUN: %clang_cl /Ox --target=i686-pc-windows-msvc -### -- %s 2>&1 | FileCheck -check-prefix=Ox %s
142 // RUN: %clang_cl /Ox --target=x86_64-pc-windows-msvc -### -- %s 2>&1 | FileCheck -check-prefix=Ox …
143 // Ox-NOT: -mdisable-fp-elim
144 // Ox: -momit-leaf-frame-pointer
145 // Ox: -O2
147 // RUN: %clang_cl --target=i686-pc-win32 /O2sy- -### -- %s 2>&1 | FileCheck -check-prefix=PR24003 %s
148 // PR24003: -mdisable-fp-elim
149 // PR24003: -momit-leaf-frame-pointer
150 // PR24003: -Os
152 // RUN: %clang_cl --target=i686-pc-win32 -Werror /Oy- /O2 -### -- %s 2>&1 | FileCheck -check-prefix
153 // Oy_2: -momit-leaf-frame-pointer
154 // Oy_2: -O2
156 // RUN: %clang_cl /Zs -Werror /Oy -- %s 2>&1
158 // RUN: %clang_cl --target=i686-pc-win32 -Werror /Oy- -### -- %s 2>&1 | FileCheck -check-prefix=Oy_…
159 // Oy_: -mdisable-fp-elim
161 // RUN: %clang_cl /Qvec -### -- %s 2>&1 | FileCheck -check-prefix=Qvec %s
162 // Qvec: -vectorize-loops
164 // RUN: %clang_cl /Qvec /Qvec- -### -- %s 2>&1 | FileCheck -check-prefix=Qvec_ %s
165 // Qvec_-NOT: -vectorize-loops
167 // RUN: %clang_cl /showIncludes -### -- %s 2>&1 | FileCheck -check-prefix=showIncludes %s
168 // showIncludes: --show-includes
170 // RUN: %clang_cl /E /showIncludes -### -- %s 2>&1 | FileCheck -check-prefix=showIncludes_E %s
171 // RUN: %clang_cl /EP /showIncludes -### -- %s 2>&1 | FileCheck -check-prefix=showIncludes_E %s
172 // showIncludes_E: warning: argument unused during compilation: '--show-includes'
174 // RUN: %clang_cl /Umymacro -### -- %s 2>&1 | FileCheck -check-prefix=U %s
175 // RUN: %clang_cl /U mymacro -### -- %s 2>&1 | FileCheck -check-prefix=U %s
176 // U: "-U" "mymacro"
178 // RUN: %clang_cl /vd2 -### -- %s 2>&1 | FileCheck -check-prefix=VD2 %s
179 // VD2: -vtordisp-mode=2
181 // RUN: %clang_cl /vmg -### -- %s 2>&1 | FileCheck -check-prefix=VMG %s
182 // VMG: "-fms-memptr-rep=virtual"
184 // RUN: %clang_cl /vmg /vms -### -- %s 2>&1 | FileCheck -check-prefix=VMS %s
185 // VMS: "-fms-memptr-rep=single"
187 // RUN: %clang_cl /vmg /vmm -### -- %s 2>&1 | FileCheck -check-prefix=VMM %s
188 // VMM: "-fms-memptr-rep=multiple"
190 // RUN: %clang_cl /vmg /vmv -### -- %s 2>&1 | FileCheck -check-prefix=VMV %s
191 // VMV: "-fms-memptr-rep=virtual"
193 // RUN: %clang_cl /vmg /vmb -### -- %s 2>&1 | FileCheck -check-prefix=VMB %s
196 // RUN: %clang_cl /vmg /vmm /vms -### -- %s 2>&1 | FileCheck -check-prefix=VMX %s
199 // RUN: %clang_cl /volatile:iso -### -- %s 2>&1 | FileCheck -check-prefix=VOLATILE-ISO %s
200 // VOLATILE-ISO-NOT: "-fms-volatile"
202 // RUN: %clang_cl /volatile:ms -### -- %s 2>&1 | FileCheck -check-prefix=VOLATILE-MS %s
203 // VOLATILE-MS: "-fms-volatile"
205 // RUN: %clang_cl /W0 -### -- %s 2>&1 | FileCheck -check-prefix=W0 %s
206 // W0: -w
208 // RUN: %clang_cl /W1 -### -- %s 2>&1 | FileCheck -check-prefix=W1 %s
209 // RUN: %clang_cl /W2 -### -- %s 2>&1 | FileCheck -check-prefix=W1 %s
210 // RUN: %clang_cl /W3 -### -- %s 2>&1 | FileCheck -check-prefix=W1 %s
211 // RUN: %clang_cl /W4 -### -- %s 2>&1 | FileCheck -check-prefix=W4 %s
212 // RUN: %clang_cl /Wall -### -- %s 2>&1 | FileCheck -check-prefix=W4 %s
213 // W1: -Wall
214 // W4: -WCL4
216 // RUN: %clang_cl /WX -### -- %s 2>&1 | FileCheck -check-prefix=WX %s
217 // WX: -Werror
219 // RUN: %clang_cl /WX- -### -- %s 2>&1 | FileCheck -check-prefix=WX_ %s
220 // WX_: -Wno-error
222 // RUN: %clang_cl /w -### -- %s 2>&1 | FileCheck -check-prefix=w %s
223 // w: -w
225 // RUN: %clang_cl /Zp -### -- %s 2>&1 | FileCheck -check-prefix=ZP %s
226 // ZP: -fpack-struct=1
228 // RUN: %clang_cl /Zp2 -### -- %s 2>&1 | FileCheck -check-prefix=ZP2 %s
229 // ZP2: -fpack-struct=2
231 // RUN: %clang_cl /Zs -### -- %s 2>&1 | FileCheck -check-prefix=Zs %s
232 // Zs: -fsyntax-only
234 // RUN: %clang_cl /FIasdf.h -### -- %s 2>&1 | FileCheck -check-prefix=FI %s
235 // FI: "-include" "asdf.h"
237 // RUN: %clang_cl /FI asdf.h -### -- %s 2>&1 | FileCheck -check-prefix=FI_ %s
238 // FI_: "-include" "asdf.h"
240 // RUN: %clang_cl /TP /c -### -- %s 2>&1 | FileCheck -check-prefix=NO-GX %s
241 // NO-GX-NOT: "-fcxx-exceptions" "-fexceptions"
243 // RUN: %clang_cl /TP /c /GX -### -- %s 2>&1 | FileCheck -check-prefix=GX %s
244 // GX: "-fcxx-exceptions" "-fexceptions"
246 // RUN: %clang_cl /TP /c /GX /GX- -### -- %s 2>&1 | FileCheck -check-prefix=GX_ %s
247 // GX_-NOT: "-fcxx-exceptions" "-fexceptions"
249 // We forward any unrecognized -W diagnostic options to cc1.
250 // RUN: %clang_cl -Wunused-pragmas -### -- %s 2>&1 | FileCheck -check-prefix=WJoined %s
251 // WJoined: "-cc1"
252 // WJoined: "-Wunused-pragmas"
254 // We recognize -f[no-]strict-aliasing.
255 // RUN: %clang_cl -c -### -- %s 2>&1 | FileCheck -check-prefix=DEFAULTSTRICT %s
256 // DEFAULTSTRICT: "-relaxed-aliasing"
257 // RUN: %clang_cl -c -fstrict-aliasing -### -- %s 2>&1 | FileCheck -check-prefix=STRICT %s
258 // STRICT-NOT: "-relaxed-aliasing"
259 // RUN: %clang_cl -c -fno-strict-aliasing -### -- %s 2>&1 | FileCheck -check-prefix=NOSTRICT %s
260 // NOSTRICT: "-relaxed-aliasing"
263 // RUN: %clang_cl -wd4005 -wd4100 -wd4910 -wd4996 -### -- %s 2>&1 | FileCheck -check-prefix=Wno %s
264 // Wno: "-cc1"
265 // Wno: "-Wno-macro-redefined"
266 // Wno: "-Wno-unused-parameter"
267 // Wno: "-Wno-dllexport-explicit-instantiation-decl"
268 // Wno: "-Wno-deprecated-declarations"
272 // RUN: /analyze- \
284 // RUN: /GS- \
285 // RUN: /kernel- \
287 // RUN: /openmp- \
290 // RUN: /sdl- \
296 // RUN: /Zo- \
297 // RUN: -### -- %s 2>&1 | FileCheck -check-prefix=IGNORED %s
298 // IGNORED-NOT: argument unused during compilation
299 // IGNORED-NOT: no such file or directory
300 // Don't confuse /openmp- with the /o flag:
301 // IGNORED-NOT: "-o" "penmp-.obj"
303 // Ignored options and compile-only options are ignored for link jobs.
305 // RUN: %clang_cl /nologo -### -- %t.obj 2>&1 | FileCheck -check-prefix=LINKUNUSED %s
306 // RUN: %clang_cl /Dfoo -### -- %t.obj 2>&1 | FileCheck -check-prefix=LINKUNUSED %s
307 // RUN: %clang_cl /MD -### -- %t.obj 2>&1 | FileCheck -check-prefix=LINKUNUSED %s
308 // LINKUNUSED-NOT: argument unused during compilation
311 // RUN: %clang_cl /Abracadabra -Qunused-arguments -### -- %s 2>&1 | FileCheck -check-prefix=UNUSED …
312 // UNUSED-NOT: argument unused during compilation
315 // (/Zs is for syntax-only)
344 // RUN: /GL- \
346 // RUN: /Gm- \
351 // RUN: /guard:cf- \
369 // RUN: /Qvec-report:2 \
377 // RUN: /Y- \
381 // RUN: /Yl- \
392 // RUN: -- %s 2>&1
394 // We support -Xclang for forwarding options to cc1.
395 // RUN: %clang_cl -Xclang hellocc1 -### -- %s 2>&1 | FileCheck -check-prefix=Xclang %s
396 // Xclang: "-cc1"
399 // RTTI is on by default. /GR- controls -fno-rtti-data.
400 // RUN: %clang_cl /c /GR- -### -- %s 2>&1 | FileCheck -check-prefix=NoRTTI %s
401 // NoRTTI: "-fno-rtti-data"
402 // NoRTTI-NOT: "-fno-rtti"
403 // RUN: %clang_cl /c /GR -### -- %s 2>&1 | FileCheck -check-prefix=RTTI %s
404 // RTTI-NOT: "-fno-rtti-data"
405 // RTTI-NOT: "-fno-rtti"
408 // RUN: %clang_cl /c -### -fms-compatibility-version=18 -- %s 2>&1 | FileCheck -check-prefix=NoThre…
409 … RUN: %clang_cl /Zc:threadSafeInit /Zc:threadSafeInit- /c -### -- %s 2>&1 | FileCheck -check-prefi…
410 // NoThreadSafeStatics: "-fno-threadsafe-statics"
412 // RUN: %clang_cl /Zc:threadSafeInit /c -### -- %s 2>&1 | FileCheck -check-prefix=ThreadSafeStatics…
413 // ThreadSafeStatics-NOT: "-fno-threadsafe-statics"
415 // RUN: %clang_cl /Zi /c -### -- %s 2>&1 | FileCheck -check-prefix=Zi %s
416 // Zi: "-gcodeview"
417 // Zi: "-debug-info-kind=limited"
419 // RUN: %clang_cl /Z7 /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7 %s
420 // Z7: "-gcodeview"
421 // Z7: "-debug-info-kind=limited"
423 // RUN: %clang_cl /Zd /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7GMLT %s
424 // Z7GMLT: "-gcodeview"
425 // Z7GMLT: "-debug-info-kind=line-tables-only"
427 // RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=BreproDefault %s
428 // BreproDefault: "-mincremental-linker-compatible"
430 // RUN: %clang_cl /Brepro- /Brepro /c '-###' -- %s 2>&1 | FileCheck -check-prefix=Brepro %s
431 // Brepro: "-mincremental-linker-compatible"
433 // RUN: %clang_cl /Brepro /Brepro- /c '-###' -- %s 2>&1 | FileCheck -check-prefix=Brepro_ %s
434 // Brepro_-NOT: "-mincremental-linker-compatible"
436 // This test was super sneaky: "/Z7" means "line-tables", but "-gdwarf" occurs
440 // line-tables-only} appear. If you assume that, then you can safely use
442 // where it appeared. And for this test, it appeared to the left of -gdwarf
444 // RUN: %clang_cl /Z7 -gdwarf /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s
445 // Z7_gdwarf: "-gcodeview"
446 // Z7_gdwarf: "-debug-info-kind=limited"
447 // Z7_gdwarf: "-dwarf-version=4"
449 // RUN: %clang_cl -fmsc-version=1800 -TP -### -- %s 2>&1 | FileCheck -check-prefix=CXX11 %s
450 // CXX11: -std=c++11
452 // RUN: %clang_cl -fmsc-version=1900 -TP -### -- %s 2>&1 | FileCheck -check-prefix=CXX14 %s
453 // CXX14: -std=c++14
455 // RUN: %clang_cl -fmsc-version=1900 -TP -std:c++14 -### -- %s 2>&1 | FileCheck -check-prefix=STDCX…
456 // STDCXX14: -std=c++14
458 // RUN: %clang_cl -fmsc-version=1900 -TP -std:c++latest -### -- %s 2>&1 | FileCheck -check-prefix=S…
459 // STDCXXLATEST: -std=c++1z
461 // RUN: env CL="/Gy" %clang_cl -### -- %s 2>&1 | FileCheck -check-prefix=ENV-CL %s
462 // ENV-CL: "-ffunction-sections"
464 // RUN: env CL="/Gy" _CL_="/Gy- -- %s" %clang_cl -### 2>&1 | FileCheck -check-prefix=ENV-_CL_ %s
465 // ENV-_CL_-NOT: "-ffunction-sections"
468 // (/Zs is for syntax-only, -Werror makes it fail hard on unknown options)
470 // RUN: --driver-mode=cl \
471 // RUN: -fcolor-diagnostics \
472 // RUN: -fno-color-diagnostics \
473 // RUN: -fdiagnostics-color \
474 // RUN: -fno-diagnostics-color \
475 // RUN: -fdiagnostics-parseable-fixits \
476 // RUN: -ferror-limit=10 \
477 // RUN: -fmsc-version=1800 \
478 // RUN: -fno-strict-aliasing \
479 // RUN: -fstrict-aliasing \
480 // RUN: -fsyntax-only \
481 // RUN: -fms-compatibility \
482 // RUN: -fno-ms-compatibility \
483 // RUN: -fms-extensions \
484 // RUN: -fno-ms-extensions \
485 // RUN: -mllvm -disable-llvm-optzns \
486 // RUN: -resource-dir \
487 // RUN: -Wunused-variable \
488 // RUN: -fmacro-backtrace-limit=0 \
489 // RUN: -Werror /Zs -- %s 2>&1