brintos

brintos / llvm-project-archived public Read only

0
0
Text · 35.5 KiB · 1b1169b Raw
849 lines · c
1// Note: %s must be preceded by --, otherwise it may be interpreted as a2// command-line option, e.g. on Mac where %s is commonly under /Users.3 4 5// Alias options:6 7// RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=c %s8// c: -c9 10// RUN: not %clang_cl /C -### -- %s 2>&1 | FileCheck -check-prefix=C %s11// C: error: invalid argument '/C' only allowed with '/E, /P or /EP'12 13// RUN: %clang_cl /C /P -### -- %s 2>&1 | FileCheck -check-prefix=C_P %s14// C_P: "-E"15// C_P: "-C"16 17// RUN: %clang_cl /d1reportAllClassLayout -### /c /WX -- %s 2>&1 | \18// RUN:     FileCheck -check-prefix=d1reportAllClassLayout %s19// d1reportAllClassLayout-NOT: warning:20// d1reportAllClassLayout-NOT: error:21// d1reportAllClassLayout: -fdump-record-layouts22 23// RUN: %clang_cl /Dfoo=bar /D bar=baz /DMYDEF#value /DMYDEF2=foo#bar /DMYDEF3#a=b /DMYDEF4# \24// RUN:    -### -- %s 2>&1 | FileCheck -check-prefix=D %s25// D: "-D" "foo=bar"26// D: "-D" "bar=baz"27// D: "-D" "MYDEF=value"28// D: "-D" "MYDEF2=foo#bar"29// D: "-D" "MYDEF3=a=b"30// D: "-D" "MYDEF4="31 32// RUN: %clang_cl /E -### -- %s 2>&1 | FileCheck -check-prefix=E %s33// E: "-E"34// E: "-o" "-"35 36// RUN: %clang_cl /EP -### -- %s 2>&1 | FileCheck -check-prefix=EP %s37// EP: "-E"38// EP: "-P"39// EP: "-o" "-"40 41// RUN: %clang_cl /external:Ipath  -### -- %s 2>&1 | FileCheck -check-prefix=EXTERNAL_I %s42// RUN: %clang_cl /external:I path -### -- %s 2>&1 | FileCheck -check-prefix=EXTERNAL_I %s43// EXTERNAL_I: "-isystem" "path"44 45// RUN: %clang_cl /fp:fast /fp:except -### -- %s 2>&1 | FileCheck -check-prefix=fpexcept %s46// fpexcept-NOT: -funsafe-math-optimizations47// fpexcept: -ffp-exception-behavior=strict48 49// RUN: %clang_cl /fp:fast /fp:except /fp:except- -### -- %s 2>&1 | FileCheck -check-prefix=fpexcept_ %s50// fpexcept_: -funsafe-math-optimizations51// fpexcept_: -ffp-exception-behavior=ignore52 53// RUN: %clang_cl /fp:precise /fp:fast -### -- %s 2>&1 | FileCheck -check-prefix=fpfast %s54// fpfast: -funsafe-math-optimizations55// fpfast: -ffast-math56 57// RUN: %clang_cl /fp:fast /fp:precise -Wno-overriding-complex-range -### -- %s 2>&1 | \58// RUN:   FileCheck -check-prefix=fpprecise %s59// fpprecise-NOT: -funsafe-math-optimizations60// fpprecise-NOT: -ffast-math61 62// RUN: %clang_cl /fp:fast /fp:strict -Wno-overriding-complex-range -### -- %s 2>&1 | \63// RUN:   FileCheck -check-prefix=fpstrict %s64// fpstrict-NOT: -funsafe-math-optimizations65// fpstrict-NOT: -ffast-math66// fpstrict: -ffp-contract=off67 68// RUN: %clang_cl /fp:strict /fp:contract -### -- %s 2>&1 | FileCheck -check-prefix=fpcontract %s69// fpcontract: -ffp-contract=on70 71// RUN: %clang_cl /fsanitize=address -### -- %s 2>&1 | FileCheck -check-prefix=fsanitize_address %s72// fsanitize_address: -fsanitize=address73 74// RUN: %clang_cl -### /FA -fprofile-instr-generate -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-INSTR-GENERATE %s75// RUN: %clang_cl -### /FA -fprofile-instr-generate -fno-rtlib-defaultlib -frtlib-defaultlib -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-INSTR-GENERATE %s76// RUN: %clang_cl -### /FA -fprofile-instr-generate=/tmp/somefile.profraw -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-INSTR-GENERATE-FILE %s77// RUN: %clang_cl -### /FAcsu -fprofile-instr-generate -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-INSTR-GENERATE %s78// RUN: %clang_cl -### /FAcsu -fprofile-instr-generate=/tmp/somefile.profraw -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-INSTR-GENERATE-FILE %s79// CHECK-PROFILE-INSTR-GENERATE: "-fprofile-instrument=clang" "--dependent-lib=clang_rt.profile{{[^"]*}}.lib"80// CHECK-PROFILE-INSTR-GENERATE-FILE: "-fprofile-instrument-path=/tmp/somefile.profraw"81 82// RUN: %clang_cl -### /FA -fprofile-instr-generate -fno-rtlib-defaultlib -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-INSTR-GENERATE-NODEF %s83// CHECK-PROFILE-INSTR-GENERATE-NODEF-NOT: "--dependent-lib=clang_rt.profile{{[^"]*}}.lib"84 85// RUN: %clang_cl -### /FA -fprofile-generate -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE %s86// RUN: %clang_cl -### /FAcsu -fprofile-generate -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE %s87// CHECK-PROFILE-GENERATE: "-fprofile-instrument=llvm" "--dependent-lib=clang_rt.profile{{[^"]*}}.lib"88 89// RUN: not %clang_cl -### /FA -fprofile-instr-generate -fprofile-instr-use -- %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s90// RUN: not %clang_cl -### /FA -fprofile-instr-generate -fprofile-instr-use=file -- %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s91// RUN: not %clang_cl -### /FAcsu -fprofile-instr-generate -fprofile-instr-use -- %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s92// RUN: not %clang_cl -### /FAcsu -fprofile-instr-generate -fprofile-instr-use=file -- %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s93// CHECK-NO-MIX-GEN-USE: '{{[a-z=-]*}}' not allowed with '{{[a-z=-]*}}'94 95// RUN: rm -rf %t && mkdir %t96// RUN: llvm-profdata merge -o %t/somefile.prof %S/Inputs/a.proftext97// RUN: llvm-profdata merge -o %t/default.profdata %S/Inputs/a.proftext98// RUN: cd %t99 100// RUN: %clang_cl -### /FA -fprofile-instr-use -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE %s101// RUN: %clang_cl -### /FA -fprofile-use -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE %s102// RUN: %clang_cl -### /FA -fprofile-instr-use=%t/somefile.prof -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE-FILE %s103// RUN: %clang_cl -### /FA -fprofile-use=%t/somefile.prof -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE-FILE %s104// RUN: %clang_cl -### /FAcsu -fprofile-instr-use -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE %s105// RUN: %clang_cl -### /FAcsu -fprofile-use -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE %s106// RUN: %clang_cl -### /FAcsu -fprofile-instr-use=%t/somefile.prof -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE-FILE %s107// RUN: %clang_cl -### /FAcsu -fprofile-use=%t/somefile.prof -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE-FILE %s108// CHECK-PROFILE-USE: "-fprofile-instrument-use-path={{.*}}default.profdata"109// CHECK-PROFILE-USE-FILE: "-fprofile-instrument-use-path={{.*}}somefile.prof"110 111// RUN: %clang_cl /GA -### -- %s 2>&1 | FileCheck -check-prefix=GA %s112// GA: -ftls-model=local-exec113 114// RTTI is on by default; just check that we don't error.115// RUN: %clang_cl /Zs /GR -- %s 2>&1116 117// RUN: %clang_cl /GR- -### -- %s 2>&1 | FileCheck -check-prefix=GR_ %s118// GR_: -fno-rtti119 120// Security Buffer Check is on by default.121// RUN: %clang_cl -### -- %s 2>&1 | FileCheck -check-prefix=GS-default %s122// GS-default: "-stack-protector" "2"123 124// RUN: %clang_cl /GS -### -- %s 2>&1 | FileCheck -check-prefix=GS %s125// GS: "-stack-protector" "2"126 127// RUN: %clang_cl /GS- -### -- %s 2>&1 | FileCheck -check-prefix=GS_ %s128// GS_-NOT: -stack-protector129 130// RUN: %clang_cl /Gy -### -- %s 2>&1 | FileCheck -check-prefix=Gy %s131// Gy: -ffunction-sections132 133// RUN: %clang_cl /Gy /Gy- -### -- %s 2>&1 | FileCheck -check-prefix=Gy_ %s134// Gy_-NOT: -ffunction-sections135 136// RUN: %clang_cl /Gs -### -- %s 2>&1 | FileCheck -check-prefix=Gs %s137// Gs: "-mstack-probe-size=4096"138// RUN: %clang_cl /Gs0 -### -- %s 2>&1 | FileCheck -check-prefix=Gs0 %s139// Gs0: "-mstack-probe-size=0"140// RUN: %clang_cl /Gs4096 -### -- %s 2>&1 | FileCheck -check-prefix=Gs4096 %s141// Gs4096: "-mstack-probe-size=4096"142 143// RUN: %clang_cl /Gw -### -- %s 2>&1 | FileCheck -check-prefix=Gw %s144// Gw: -fdata-sections145 146// RUN: %clang_cl /Gw /Gw- -### -- %s 2>&1 | FileCheck -check-prefix=Gw_ %s147// Gw_-NOT: -fdata-sections148 149// RUN: %clang_cl /hotpatch -### -- %s 2>&1 | FileCheck -check-prefix=hotpatch %s150// hotpatch: -fms-hotpatch151 152// RUN: %clang_cl /Imyincludedir -### -- %s 2>&1 | FileCheck -check-prefix=SLASH_I %s153// RUN: %clang_cl /I myincludedir -### -- %s 2>&1 | FileCheck -check-prefix=SLASH_I %s154// SLASH_I: "-I" "myincludedir"155 156// RUN: %clang_cl /imsvcmyincludedir -### -- %s 2>&1 | FileCheck -check-prefix=SLASH_imsvc %s157// RUN: %clang_cl /imsvc myincludedir -### -- %s 2>&1 | FileCheck -check-prefix=SLASH_imsvc %s158// Clang's resource header directory should be first:159// SLASH_imsvc: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"160// SLASH_imsvc: "-internal-isystem" "[[RESOURCE_DIR]]{{[/\\]+}}include"161// SLASH_imsvc: "-internal-isystem" "myincludedir"162 163// RUN: %clang_cl /J -### -- %s 2>&1 | FileCheck -check-prefix=J %s164// J: -fno-signed-char165 166// RUN: %clang_cl /Ofoo -### -- %s 2>&1 | FileCheck -check-prefix=O %s167// O: /Ofoo168 169// RUN: %clang_cl /Ob0 -### -- %s 2>&1 | FileCheck -check-prefix=Ob0 %s170// Ob0: -fno-inline171 172// RUN: %clang_cl /Ob2 -### -- %s 2>&1 | FileCheck -check-prefix=Ob2 %s173// RUN: %clang_cl /Ob3 -### -- %s 2>&1 | FileCheck -check-prefix=Ob2 %s174// RUN: %clang_cl /Odb2 -### -- %s 2>&1 | FileCheck -check-prefix=Ob2 %s175// RUN: %clang_cl /Odb3 -### -- %s 2>&1 | FileCheck -check-prefix=Ob2 %s176// RUN: %clang_cl /O2 /Ob2 -### -- %s 2>&1 | FileCheck -check-prefix=Ob2 %s177// Ob2-NOT: warning: argument unused during compilation: '/O2'178// Ob2: -finline-functions179 180// RUN: %clang_cl /Ob1 -### -- %s 2>&1 | FileCheck -check-prefix=Ob1 %s181// RUN: %clang_cl /Odb1 -### -- %s 2>&1 | FileCheck -check-prefix=Ob1 %s182// Ob1: -finline-hint-functions183 184// RUN: %clang_cl /Od -### -- %s 2>&1 | FileCheck -check-prefix=Od %s185// Od: -O0186 187// RUN: %clang_cl /Oi- /Oi -### -- %s 2>&1 | FileCheck -check-prefix=Oi %s188// Oi-NOT: -fno-builtin189 190// RUN: %clang_cl /Oi- -### -- %s 2>&1 | FileCheck -check-prefix=Oi_ %s191// Oi_: -fno-builtin192 193// RUN: %clang_cl /Os --target=i686-pc-windows-msvc -### -- %s 2>&1 | FileCheck -check-prefix=Os %s194// RUN: %clang_cl /Os --target=x86_64-pc-windows-msvc -### -- %s 2>&1 | FileCheck -check-prefix=Os %s195// Os: -Os196// Os: -mframe-pointer=none197 198// RUN: %clang_cl /Ot --target=i686-pc-windows-msvc -### -- %s 2>&1 | FileCheck -check-prefix=Ot %s199// RUN: %clang_cl /Ot --target=x86_64-pc-windows-msvc -### -- %s 2>&1 | FileCheck -check-prefix=Ot %s200// Ot: -O3201// Ot: -mframe-pointer=none202 203// RUN: %clang_cl /Ox --target=i686-pc-windows-msvc -### -- %s 2>&1 | FileCheck -check-prefix=Ox %s204// RUN: %clang_cl /Ox --target=x86_64-pc-windows-msvc -### -- %s 2>&1 | FileCheck -check-prefix=Ox %s205// Ox: -O3206// Ox: -mframe-pointer=none207 208// RUN: %clang_cl --target=i686-pc-win32 /O2sy- -### -- %s 2>&1 | FileCheck -check-prefix=PR24003 %s209// PR24003: -Os210// PR24003: -mframe-pointer=all211 212// RUN: %clang_cl --target=i686-pc-win32 -Werror -Wno-msvc-not-found /Oy- /O2 -### -- %s 2>&1 | FileCheck -check-prefix=Oy_2 %s213// Oy_2: -O3214// Oy_2: -mframe-pointer=all215 216// RUN: %clang_cl --target=aarch64-pc-windows-msvc -Werror -Wno-msvc-not-found /Oy- /O2 -### -- %s 2>&1 | FileCheck -check-prefix=Oy_aarch64 %s217// Oy_aarch64: -O3218// Oy_aarch64: -mframe-pointer=non-leaf219 220// RUN: %clang_cl --target=i686-pc-win32 -Werror -Wno-msvc-not-found /O2 /O2 -### -- %s 2>&1 | FileCheck -check-prefix=O2O2 %s221// O2O2: "-O3"222 223// RUN: %clang_cl /Zs -Werror /Oy -- %s 2>&1224 225// RUN: %clang_cl --target=i686-pc-win32 -Werror -Wno-msvc-not-found /Oy- -### -- %s 2>&1 | FileCheck -check-prefix=Oy_ %s226// Oy_: -mframe-pointer=all227 228// RUN: %clang_cl /Qvec -### -- %s 2>&1 | FileCheck -check-prefix=Qvec %s229// Qvec: -vectorize-loops230 231// RUN: %clang_cl /Qvec /Qvec- -### -- %s 2>&1 | FileCheck -check-prefix=Qvec_ %s232// Qvec_-NOT: -vectorize-loops233 234// RUN: %clang_cl /showIncludes -### -- %s 2>&1 | FileCheck -check-prefix=showIncludes_ %s235// showIncludes_: --show-includes236// showIncludes_: -sys-header-deps237 238// RUN: %clang_cl /showIncludes:user -### -- %s 2>&1 | FileCheck -check-prefix=showIncludesUser %s239// showIncludesUser: --show-includes240// showIncludesUser-NOT: -sys-header-deps241 242// RUN: %clang_cl /E /showIncludes -### -- %s 2>&1 | FileCheck -check-prefix=showIncludes_E %s243// RUN: %clang_cl /E /showIncludes:user -### -- %s 2>&1 | FileCheck -check-prefix=showIncludes_E %s244// RUN: %clang_cl /EP /showIncludes -### -- %s 2>&1 | FileCheck -check-prefix=showIncludes_E %s245// RUN: %clang_cl /E /EP /showIncludes -### -- %s 2>&1 | FileCheck -check-prefix=showIncludes_E %s246// RUN: %clang_cl /EP /P /showIncludes -### -- %s 2>&1 | FileCheck -check-prefix=showIncludes_E %s247// showIncludes_E-NOT: warning: argument unused during compilation: '--show-includes'248 249// /source-charset: should warn on everything except UTF-8.250// RUN: not %clang_cl /source-charset:utf-16 -### -- %s 2>&1 | FileCheck -check-prefix=source-charset-utf-16 %s251// source-charset-utf-16: invalid value 'utf-16' in '/source-charset:utf-16'252 253// /execution-charset: should warn on everything except UTF-8.254// RUN: not %clang_cl /execution-charset:utf-16 -### -- %s 2>&1 | FileCheck -check-prefix=execution-charset-utf-16 %s255// execution-charset-utf-16: invalid value 'utf-16' in '/execution-charset:utf-16'256//257// RUN: %clang_cl /Umymacro -### -- %s 2>&1 | FileCheck -check-prefix=U %s258// RUN: %clang_cl /U mymacro -### -- %s 2>&1 | FileCheck -check-prefix=U %s259// U: "-U" "mymacro"260 261// RUN: %clang_cl /validate-charset -### -- %s 2>&1 | FileCheck -check-prefix=validate-charset %s262// validate-charset: -Winvalid-source-encoding263 264// RUN: %clang_cl /validate-charset- -### -- %s 2>&1 | FileCheck -check-prefix=validate-charset_ %s265// validate-charset_: -Wno-invalid-source-encoding266 267// RUN: %clang_cl /vd2 -### -- %s 2>&1 | FileCheck -check-prefix=VD2 %s268// VD2: -vtordisp-mode=2269 270// RUN: %clang_cl /vmg -### -- %s 2>&1 | FileCheck -check-prefix=VMG %s271// VMG: "-fms-memptr-rep=virtual"272 273// RUN: %clang_cl /vmg /vms -### -- %s 2>&1 | FileCheck -check-prefix=VMS %s274// VMS: "-fms-memptr-rep=single"275 276// RUN: %clang_cl /vmg /vmm -### -- %s 2>&1 | FileCheck -check-prefix=VMM %s277// VMM: "-fms-memptr-rep=multiple"278 279// RUN: %clang_cl /vmg /vmv -### -- %s 2>&1 | FileCheck -check-prefix=VMV %s280// VMV: "-fms-memptr-rep=virtual"281 282// RUN: not %clang_cl /vmg /vmb -### -- %s 2>&1 | FileCheck -check-prefix=VMB %s283// VMB: '/vmg' not allowed with '/vmb'284 285// RUN: not %clang_cl /vmg /vmm /vms -### -- %s 2>&1 | FileCheck -check-prefix=VMX %s286// VMX: '/vms' not allowed with '/vmm'287 288// RUN: %clang_cl --target=i686-pc-win32 /volatile:iso -### -- %s 2>&1 | FileCheck -check-prefix=VOLATILE-ISO %s289// RUN: %clang_cl --target=aarch64-pc-win32 -### -- %s 2>&1 | FileCheck -check-prefix=VOLATILE-ISO %s290// VOLATILE-ISO-NOT: "-fms-volatile"291 292// RUN: %clang_cl --target=aarch64-pc-win32 /volatile:ms -### -- %s 2>&1 | FileCheck -check-prefix=VOLATILE-MS %s293// RUN: %clang_cl --target=i686-pc-win32 -### -- %s 2>&1 | FileCheck -check-prefix=VOLATILE-MS %s294// VOLATILE-MS: "-fms-volatile"295 296// RUN: %clang_cl /W0 -### -- %s 2>&1 | FileCheck -check-prefix=W0 %s297// W0: -w298 299// RUN: %clang_cl /W1 -### -- %s 2>&1 | FileCheck -check-prefix=W1 %s300// RUN: %clang_cl /W2 -### -- %s 2>&1 | FileCheck -check-prefix=W1 %s301// RUN: %clang_cl /W3 -### -- %s 2>&1 | FileCheck -check-prefix=W1 %s302// RUN: %clang_cl /W4 -### -- %s 2>&1 | FileCheck -check-prefix=W4 %s303// RUN: %clang_cl /Wall -### -- %s 2>&1 | FileCheck -check-prefix=Weverything %s304// W1: -Wall305// W4: -WCL4306// Weverything: -Weverything307 308// RUN: %clang_cl /WX -Wno-msvc-not-found -### -- %s 2>&1 | FileCheck -check-prefix=WX %s309// WX: -Werror310 311// RUN: %clang_cl /WX- -### -- %s 2>&1 | FileCheck -check-prefix=WX_ %s312// WX_: -Wno-error313 314// RUN: %clang_cl /w -### -- %s 2>&1 | FileCheck -check-prefix=w %s315// w: -w316 317// RUN: %clang_cl /Zp -### -- %s 2>&1 | FileCheck -check-prefix=ZP %s318// ZP: -fpack-struct=1319 320// RUN: %clang_cl /Zp2 -### -- %s 2>&1 | FileCheck -check-prefix=ZP2 %s321// ZP2: -fpack-struct=2322 323// RUN: %clang_cl /Zs -### -- %s 2>&1 | FileCheck -check-prefix=Zs %s324// Zs: -fsyntax-only325 326// RUN: %clang_cl /FIasdf.h -### -- %s 2>&1 | FileCheck -check-prefix=FI %s327// FI: "-include" "asdf.h"328 329// RUN: %clang_cl /FI asdf.h -### -- %s 2>&1 | FileCheck -check-prefix=FI_ %s330// FI_: "-include" "asdf.h"331 332// RUN: %clang_cl /TP /c -### -- %s 2>&1 | FileCheck -check-prefix=NO-GX %s333// NO-GX-NOT: "-fcxx-exceptions" "-fexceptions"334 335// RUN: %clang_cl /TP /c /GX -### -- %s 2>&1 | FileCheck -check-prefix=GX %s336// GX: "-fcxx-exceptions" "-fexceptions"337 338// RUN: %clang_cl /TP /c /GX /GX- -### -- %s 2>&1 | FileCheck -check-prefix=GX_ %s339// GX_-NOT: "-fcxx-exceptions" "-fexceptions"340 341// RUN: %clang_cl /d1PP -### -- %s 2>&1 | FileCheck -check-prefix=d1PP %s342// d1PP: -dD343 344// RUN: %clang_cl --target=i686-pc-windows-msvc /c /QIntel-jcc-erratum -### -- %s 2>&1 | FileCheck -check-prefix=jcceratum %s345// jcceratum: "-mllvm" "-x86-branches-within-32B-boundaries"346 347 348// We forward any unrecognized -W diagnostic options to cc1.349// RUN: %clang_cl -Wunused-pragmas -### -- %s 2>&1 | FileCheck -check-prefix=WJoined %s350// WJoined: "-cc1"351// WJoined: "-Wunused-pragmas"352 353// We recognize -f[no-]strict-aliasing.354// RUN: %clang_cl -c -### -- %s 2>&1 | FileCheck -check-prefix=DEFAULTSTRICT %s355// DEFAULTSTRICT: "-relaxed-aliasing"356// RUN: %clang_cl -c -fstrict-aliasing -### -- %s 2>&1 | FileCheck -check-prefix=STRICT %s357// STRICT-NOT: "-relaxed-aliasing"358// RUN: %clang_cl -c -fno-strict-aliasing -### -- %s 2>&1 | FileCheck -check-prefix=NOSTRICT %s359// NOSTRICT: "-relaxed-aliasing"360 361// We recognize -f[no-]delete-null-pointer-checks.362// RUN: %clang_cl -c -### -- %s 2>&1 | FileCheck -check-prefix=DEFAULTNULL %s363// DEFAULTNULL-NOT: "-fno-delete-null-pointer-checks"364// RUN: %clang_cl -c -fdelete-null-pointer-checks -### -- %s 2>&1 | FileCheck -check-prefix=NULL %s365// NULL-NOT: "-fno-delete-null-pointer-checks"366// RUN: %clang_cl -c -fno-delete-null-pointer-checks -### -- %s 2>&1 | FileCheck -check-prefix=NONULL %s367// NONULL: "-fno-delete-null-pointer-checks"368 369// RUN: %clang_cl -c -### /std:c11 -- %s 2>&1 | FileCheck -check-prefix CHECK-C11 %s370// CHECK-C11: -std=c11371 372// RUN: %clang_cl -c -### /std:c17 -- %s 2>&1 | FileCheck -check-prefix CHECK-C17 %s373// CHECK-C17: -std=c17374 375// RUN: %clang_cl -c -### /std:clatest -- %s 2>&1 | FileCheck -check-prefix CHECK-CLATEST %s376// CHECK-CLATEST: -std=c23377 378// For some warning ids, we can map from MSVC warning to Clang warning.379// RUN: %clang_cl -wd4005 -wd4100 -wd4910 -wd4996 -wd12345678 -### -- %s 2>&1 | FileCheck -check-prefix=Wno %s380// Wno: "-cc1"381// Wno: "-Wno-macro-redefined"382// Wno: "-Wno-unused-parameter"383// Wno: "-Wno-dllexport-explicit-instantiation-decl"384// Wno: "-Wno-deprecated-declarations"385// Wno-NOT: "-wd386 387// Ignored options. Check that we don't get "unused during compilation" errors.388// RUN: %clang_cl /c \389// RUN:    /analyze- \390// RUN:    /bigobj \391// RUN:    /cgthreads4 \392// RUN:    /cgthreads8 \393// RUN:    /d2FastFail \394// RUN:    /d2Zi+ \395// RUN:    /errorReport:foo \396// RUN:    /execution-charset:utf-8 \397// RUN:    /FC \398// RUN:    /Fdfoo \399// RUN:    /FS \400// RUN:    /Gd \401// RUN:    /GF \402// RUN:    /GS- \403// RUN:    /kernel- \404// RUN:    /nologo \405// RUN:    /Og \406// RUN:    /openmp- \407// RUN:    /permissive- \408// RUN:    /RTC1 \409// RUN:    /sdl \410// RUN:    /sdl- \411// RUN:    /source-charset:utf-8 \412// RUN:    /utf-8 \413// RUN:    /vmg \414// RUN:    /volatile:iso \415// RUN:    /w12345 \416// RUN:    /wd1234 \417// RUN:    /Wv \418// RUN:    /Wv:17 \419// RUN:    /Zm \420// RUN:    /Zo \421// RUN:    /Zo- \422// RUN:    -### -- %s 2>&1 | FileCheck -DMSG=%errc_ENOENT -check-prefix=IGNORED %s423// IGNORED-NOT: argument unused during compilation424// IGNORED-NOT: [[MSG]]425// Don't confuse /openmp- with the /o flag:426// IGNORED-NOT: "-o" "penmp-.obj"427 428// Ignored options and compile-only options are ignored for link jobs.429// RUN: touch %t.obj430// RUN: %clang_cl /nologo -### -- %t.obj 2>&1 | FileCheck -check-prefix=LINKUNUSED %s431// RUN: %clang_cl /Dfoo -### -- %t.obj 2>&1 | FileCheck -check-prefix=LINKUNUSED %s432// RUN: %clang_cl /MD -### -- %t.obj 2>&1 | FileCheck -check-prefix=LINKUNUSED %s433// LINKUNUSED-NOT: argument unused during compilation434 435// Support ignoring warnings about unused arguments.436// RUN: not %clang_cl /Abracadabra -Qunused-arguments -### -- %s 2>&1 | FileCheck -check-prefix=UNUSED %s437// UNUSED-NOT: argument unused during compilation438 439// Unsupported but parsed options. Check that we don't error on them.440// (/Zs is for syntax-only)441// RUN: %clang_cl /Zs \442// RUN:     /await \443// RUN:     /await:strict \444// RUN:     /constexpr:depth1000 /constexpr:backtrace1000 /constexpr:steps1000 \445// RUN:     /AIfoo \446// RUN:     /AI foo_does_not_exist \447// RUN:     /Bt \448// RUN:     /Bt+ \449// RUN:     /clr:pure \450// RUN:     /d1import_no_registry \451// RUN:     /d1nodatetime \452// RUN:     /d2FH4 \453// RUN:     /d2TrimInlines \454// RUN:     /docname \455// RUN:     /dynamicdeopt \456// RUN:     /experimental:external \457// RUN:     /experimental:module \458// RUN:     /experimental:preprocessor \459// RUN:     /exportHeader /headerName:foo \460// RUN:     /external:anglebrackets \461// RUN:     /external:env:var \462// RUN:     /external:W0 \463// RUN:     /external:W1 \464// RUN:     /external:W2 \465// RUN:     /external:W3 \466// RUN:     /external:W4 \467// RUN:     /external:templates- \468// RUN:     /headerUnit foo.h=foo.ifc /headerUnit:quote foo.h=foo.ifc /headerUnit:angle foo.h=foo.ifc \469// RUN:     /EHsc \470// RUN:     /F 42 \471// RUN:     /FA \472// RUN:     /FAc \473// RUN:     /Fafilename \474// RUN:     /FAs \475// RUN:     /FAu \476// RUN:     /favor:blend \477// RUN:     /fno-sanitize-address-vcasan-lib \478// RUN:     /Fifoo \479// RUN:     /Fmfoo \480// RUN:     /FpDebug\main.pch \481// RUN:     /Frfoo \482// RUN:     /FRfoo \483// RUN:     /FU foo \484// RUN:     /Fx \485// RUN:     /G1 \486// RUN:     /G2 \487// RUN:     /GA \488// RUN:     /Gd \489// RUN:     /Ge \490// RUN:     /Gh \491// RUN:     /GH \492// RUN:     /GL \493// RUN:     /GL- \494// RUN:     /Gm \495// RUN:     /Gm- \496// RUN:     /Gr \497// RUN:     /GS \498// RUN:     /GT \499// RUN:     /GX \500// RUN:     /Gv \501// RUN:     /Gz \502// RUN:     /GZ \503// RUN:     /H \504// RUN:     /homeparams \505// RUN:     /kernel \506// RUN:     /LN \507// RUN:     /MP \508// RUN:     /o foo.obj \509// RUN:     /ofoo.obj \510// RUN:     /openmp \511// RUN:     /openmp:experimental \512// RUN:     /Qfast_transcendentals \513// RUN:     /QIfist \514// RUN:     /Qimprecise_fwaits \515// RUN:     /Qpar \516// RUN:     /Qpar-report:1 \517// RUN:     /Qsafe_fp_loads \518// RUN:     /Qspectre \519// RUN:     /Qspectre-load \520// RUN:     /Qspectre-load-cf \521// RUN:     /Qvec-report:2 \522// RUN:     /reference foo=foo.ifc /reference foo.ifc \523// RUN:     /sourceDependencies foo.json \524// RUN:     /sourceDependencies:directives foo.json \525// RUN:     /translateInclude \526// RUN:     /u \527// RUN:     /V \528// RUN:     /volatile:ms \529// RUN:     /wfoo \530// RUN:     /WL \531// RUN:     /Wp64 \532// RUN:     /X \533// RUN:     /Y- \534// RUN:     /Yc \535// RUN:     /Ycstdafx.h \536// RUN:     /Yd \537// RUN:     /Yl- \538// RUN:     /Ylfoo \539// RUN:     /Yustdafx.h \540// RUN:     /Z7 \541// RUN:     /Za \542// RUN:     /Ze \543// RUN:     /Zg \544// RUN:     /Zi \545// RUN:     /ZI \546// RUN:     /Zl \547// RUN:     /ZW:nostdlib \548// RUN:     -- %s 2>&1549 550// We support -Xclang for forwarding options to cc1.551// RUN: %clang_cl -Xclang hellocc1 -### -- %s 2>&1 | FileCheck -check-prefix=Xclang %s552// Xclang: "-cc1"553// Xclang: "hellocc1"554 555// Files under /Users are often confused with the /U flag. (This could happen556// for other flags too, but this is the one people run into.)557// RUN: %clang_cl /c /Users/me/myfile.c -### 2>&1 | FileCheck -check-prefix=SlashU %s558// SlashU: warning: '/Users/me/myfile.c' treated as the '/U' option559// SlashU: note: use '--' to treat subsequent arguments as filenames560 561// RTTI is on by default. /GR- controls -fno-rtti-data.562// RUN: %clang_cl /c /GR- -### -- %s 2>&1 | FileCheck -check-prefix=NoRTTI %s563// NoRTTI: "-fno-rtti-data"564// NoRTTI-NOT: "-fno-rtti"565// RUN: %clang_cl /c /GR -### -- %s 2>&1 | FileCheck -check-prefix=RTTI %s566// RTTI-NOT: "-fno-rtti-data"567// RTTI-NOT: "-fno-rtti"568 569// RUN: %clang_cl -target x86_64-windows /Zi /c -### -- %s 2>&1 | FileCheck -check-prefix=Zi %s570// Zi: "-gcodeview"571// Zi: "-debug-info-kind=constructor"572 573// RUN: %clang_cl -target x86_64-windows /Z7 /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7 %s574// Z7: "-gcodeview"575// Z7: "-debug-info-kind=constructor"576 577// RUN: %clang_cl -target x86_64-windows -gline-tables-only /c -### -- %s 2>&1 | FileCheck -check-prefix=ZGMLT %s578// ZGMLT: "-gcodeview"579// ZGMLT: "-debug-info-kind=line-tables-only"580 581// RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=BreproDefault %s582// BreproDefault: "-mincremental-linker-compatible"583 584// RUN: %clang_cl /Brepro- /Brepro /c '-###' -- %s 2>&1 | FileCheck -check-prefix=Brepro %s585// Brepro-NOT: "-mincremental-linker-compatible"586 587// RUN: %clang_cl /Brepro /Brepro- /c '-###' -- %s 2>&1 | FileCheck -check-prefix=Brepro_ %s588// Brepro_: "-mincremental-linker-compatible"589 590// If We specify both /Z7 and -gdwarf we should get dwarf, not codeview.591// RUN: %clang_cl /Z7 -gdwarf /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s592// RUN: %clang_cl -gdwarf /Z7 /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s593// Z7_gdwarf-NOT: "-gcodeview"594// Z7_gdwarf: "-debug-info-kind=constructor"595// Z7_gdwarf: "-dwarf-version=596 597// RUN: %clang_cl /ZH:MD5 /c -### -- %s 2>&1 | FileCheck -check-prefix=ZH_MD5 %s598// ZH_MD5: "-gsrc-hash=md5"599 600// RUN: %clang_cl /ZH:SHA1 /c -### -- %s 2>&1 \601// RUN:     | FileCheck -check-prefix=ZH_SHA1 %s602// ZH_SHA1: "-gsrc-hash=sha1"603 604// RUN: %clang_cl /ZH:SHA_256 /c -### -- %s 2>&1 \605// RUN:     | FileCheck -check-prefix=ZH_SHA256 %s606// ZH_SHA256: "-gsrc-hash=sha256"607 608// RUN: %clang_cl -fmsc-version=1800 -TP -### -- %s 2>&1 | FileCheck -check-prefix=CXX11 %s609// CXX11: -std=c++11610 611// RUN: %clang_cl -fmsc-version=1900 -TP -### -- %s 2>&1 | FileCheck -check-prefix=CXX14 %s612// CXX14: -std=c++14613 614// RUN: %clang_cl -fmsc-version=1900 -TP -std:c++14 -### -- %s 2>&1 | FileCheck -check-prefix=STDCXX14 %s615// STDCXX14: -std=c++14616 617// RUN: %clang_cl -fmsc-version=1900 -TP -std:c++17 -### -- %s 2>&1 | FileCheck -check-prefix=STDCXX17 %s618// STDCXX17: -std=c++17619 620// RUN: %clang_cl -fmsc-version=1900 -TP -std:c++20 -### -- %s 2>&1 | FileCheck -check-prefix=STDCXX20 %s621// STDCXX20: -std=c++20622 623// RUN: %clang_cl -fmsc-version=1900 -TP -std:c++23preview -### -- %s 2>&1 | FileCheck -check-prefix=STDCXX23PREVIEW %s624// STDCXX23PREVIEW: -std=c++23625 626// RUN: %clang_cl -fmsc-version=1900 -TP -std:c++latest -### -- %s 2>&1 | FileCheck -check-prefix=STDCXXLATEST %s627// STDCXXLATEST: -std=c++26628 629// RUN: env CL="/Gy" %clang_cl -### -- %s 2>&1 | FileCheck -check-prefix=ENV-CL %s630// ENV-CL: "-ffunction-sections"631 632// RUN: env CL="/Gy" _CL_="/Gy- -- %s" %clang_cl -### 2>&1 | FileCheck -check-prefix=ENV-_CL_ %s633// ENV-_CL_-NOT: "-ffunction-sections"634 635// RUN: env CL="%s" _CL_="%s" not %clang --rsp-quoting=windows -c636 637// RUN: %clang_cl -### /c -flto -- %s 2>&1 | FileCheck -check-prefix=LTO %s638// LTO: -flto639 640// RUN: %clang_cl -### /c -flto -fno-lto -- %s 2>&1 | FileCheck -check-prefix=LTO-NO %s641// LTO-NO-NOT: "-flto"642 643// RUN: %clang_cl -### /c -flto=thin -- %s 2>&1 | FileCheck -check-prefix=LTO-THIN %s644// LTO-THIN: -flto=thin645 646// RUN: not %clang_cl -### -Fe%t.exe -entry:main -flto -- %s 2>&1 | FileCheck -check-prefix=LTO-WITHOUT-LLD %s647// RUN: not %clang_cl -### -fuse-ld=link -Fe%t.exe -entry:main -flto -- %s 2>&1 | FileCheck -check-prefix=LTO-WITHOUT-LLD %s648// RUN: not %clang -### --target=x86_64-windows-msvc -fuse-ld=link -Fe%t.exe -entry:main -flto -- %s 2>&1 | FileCheck -check-prefix=LTO-WITHOUT-LLD %s649// LTO-WITHOUT-LLD: LTO requires -fuse-ld=lld650 651// RUN: %clang_cl  -### -- %s 2>&1 | FileCheck -check-prefix=NOCFGUARD %s652// RUN: %clang_cl /guard:cf- -### -- %s 2>&1 | FileCheck -check-prefix=NOCFGUARD %s653// NOCFGUARD-NOT: -cfguard654 655// RUN: %clang_cl /guard:cf -### -- %s 2>&1 | FileCheck -check-prefix=CFGUARD %s656// CFGUARD: -cfguard657// CFGUARD-NOT: -cfguard-no-checks658 659// RUN: %clang_cl /guard:cf,nochecks -### -- %s 2>&1 | FileCheck -check-prefix=CFGUARDNOCHECKS %s660// CFGUARDNOCHECKS: -cfguard-no-checks661 662// RUN: not %clang_cl /guard:nochecks -### -- %s 2>&1 | FileCheck -check-prefix=CFGUARDNOCHECKSINVALID %s663// CFGUARDNOCHECKSINVALID: invalid value 'nochecks' in '/guard:'664 665// RUN: %clang_cl  -### -- %s 2>&1 | FileCheck -check-prefix=NOEHCONTGUARD %s666// RUN: %clang_cl /guard:ehcont- -### -- %s 2>&1 | FileCheck -check-prefix=NOEHCONTGUARD %s667// NOEHCONTGUARD-NOT: -ehcontguard668 669// RUN: %clang_cl /guard:ehcont -### -- %s 2>&1 | FileCheck -check-prefix=EHCONTGUARD %s670// EHCONTGUARD: -ehcontguard671 672// RUN: %clang_cl /guard:cf /guard:ehcont -Wall -Wno-msvc-not-found -### -- %s 2>&1 | \673// RUN:   FileCheck -check-prefix=BOTHGUARD %s --implicit-check-not=warning:674// BOTHGUARD: -cfguard675// BOTHGUARD-SAME: -ehcontguard676// BOTHGUARD: -guard:cf677// BOTHGUARD-SAME: -guard:ehcont678 679// RUN: not %clang_cl /guard:foo -### -- %s 2>&1 | FileCheck -check-prefix=CFGUARDINVALID %s680// CFGUARDINVALID: invalid value 'foo' in '/guard:'681 682// Accept "core" clang options.683// (/Zs is for syntax-only, -Werror makes it fail hard on unknown options)684// RUN: %clang_cl \685// RUN:     --driver-mode=cl \686// RUN:     -fblocks \687// RUN:     -fcrash-diagnostics-dir=/foo \688// RUN:     -fno-crash-diagnostics \689// RUN:     -fno-blocks \690// RUN:     -fbuiltin \691// RUN:     -fno-builtin \692// RUN:     -fno-builtin-strcpy \693// RUN:     -fcolor-diagnostics \694// RUN:     -fno-color-diagnostics \695// RUN:     -fcoverage-mapping \696// RUN:     -fno-coverage-mapping \697// RUN:     -fdiagnostics-color \698// RUN:     -fdiagnostics-color=auto \699// RUN:     -fno-diagnostics-color \700// RUN:     -fdebug-compilation-dir . \701// RUN:     -fdebug-compilation-dir=. \702// RUN:     -ffile-compilation-dir=. \703// RUN:     -fdiagnostics-parseable-fixits \704// RUN:     -fdiagnostics-absolute-paths \705// RUN:     -ferror-limit=10 \706// RUN:     -fident \707// RUN:     -fno-ident \708// RUN:     -fmsc-version=1800 \709// RUN:     -fno-strict-aliasing \710// RUN:     -fstrict-aliasing \711// RUN:     -fsyntax-only \712// RUN:     -fms-compatibility \713// RUN:     -fno-ms-compatibility \714// RUN:     -fms-extensions \715// RUN:     -fno-ms-extensions \716// RUN:     -Xclang -disable-llvm-passes \717// RUN:     -resource-dir asdf \718// RUN:     -resource-dir=asdf \719// RUN:     -Wunused-variable \720// RUN:     -fmacro-backtrace-limit=0 \721// RUN:     -fstandalone-debug \722// RUN:     -feliminate-unused-debug-types \723// RUN:     -fno-eliminate-unused-debug-types \724// RUN:     -flimit-debug-info \725// RUN:     -flto \726// RUN:     -fmerge-all-constants \727// RUN:     -no-canonical-prefixes \728// RUN:     -march=skylake \729// RUN:     -fbracket-depth=123 \730// RUN:     -fprofile-generate \731// RUN:     -fprofile-generate=dir \732// RUN:     -fprofile-sample-use=%S/Inputs/file.prof \733// RUN:     -fno-profile-generate \734// RUN:     -fno-profile-instr-generate \735// RUN:     -fno-profile-instr-use \736// RUN:     -fcs-profile-generate \737// RUN:     -fcs-profile-generate=dir \738// RUN:     -fpseudo-probe-for-profiling \739// RUN:     -ftime-trace \740// RUN:     -fmodules \741// RUN:     -fno-modules \742// RUN:     -fimplicit-module-maps \743// RUN:     -fmodule-maps \744// RUN:     -fmodule-name=foo \745// RUN:     -fmodule-implementation-of \746// RUN:     -fsystem-module \747// RUN:     -fmodule-map-file=foo \748// RUN:     -fmodule-file=foo \749// RUN:     -fmodules-ignore-macro=foo \750// RUN:     -fmodules-strict-decluse \751// RUN:     -fmodules-decluse \752// RUN:     -fno-modules-decluse \753// RUN:     -fmodules-search-all \754// RUN:     -fno-modules-search-all \755// RUN:     -fimplicit-modules \756// RUN:     -fno-implicit-modules \757// RUN:     -fstrict-overflow \758// RUN:     -fno-strict-overflow \759// RUN:     -ftrivial-auto-var-init=zero \760// RUN:     -fwrapv \761// RUN:     -fno-wrapv \762// RUN:     -fwrapv-pointer \763// RUN:     -fno-wrapv-pointer \764// RUN:     --version \765// RUN:     --warning-suppression-mappings=foo \766// RUN:     -Werror /Zs -- %s 2>&1767 768// Accept clang options under the /clang: flag.769// The first test case ensures that the SLP vectorizer is on by default and that770// it's being turned off by the /clang:-fno-slp-vectorize flag.771 772// RUN: %clang_cl -O2 -### -- %s 2>&1 | FileCheck -check-prefix=NOCLANG %s773// NOCLANG: "--dependent-lib=libcmt"774// NOCLANG-SAME: "-vectorize-slp"775// NOCLANG-NOT: "--dependent-lib=msvcrt"776 777// RUN: %clang_cl -O2 -MD /clang:-fno-slp-vectorize /clang:-MD /clang:-MF /clang:my_dependency_file.dep /c /Fo%/t/cl-options.obj -### -- %s 2>&1 | FileCheck -DPREFIX=%/t -check-prefix=CLANG %s778// CLANG: "--dependent-lib=msvcrt"779// CLANG-SAME: "-dependency-file" "my_dependency_file.dep"780// CLANG-SAME: "-MT" "[[PREFIX]]/cl-options.obj"781// CLANG-NOT: "--dependent-lib=libcmt"782// CLANG-NOT: "-vectorize-slp"783 784// Cover PR42501: clang-cl /clang: pass-through causes read-after-free with aliased options.785// RUN: %clang_cl /clang:-save-temps /clang:-Wl,test1,test2 -### -- %s 2>&1 | FileCheck -check-prefix=SAVETEMPS %s786// SAVETEMPS: "-save-temps=cwd"787// SAVETEMPS: "test1" "test2"788 789// Validate that the default triple is used when run an empty tools dir is specified790// RUN: %clang_cl -vctoolsdir "" -### -- %s 2>&1 | FileCheck %s --check-prefix VCTOOLSDIR791// VCTOOLSDIR: "-triple" "{{[a-zA-Z0-9_-]*}}-pc-windows-msvc19.33.0"792 793// Validate that built-in include paths are based on the supplied path794// RUN: %clang_cl --target=aarch64-pc-windows-msvc -vctoolsdir "/fake" -winsdkdir "/foo" -winsdkversion 10.0.12345.0 -### -- %s 2>&1 | FileCheck %s --check-prefix FAKEDIR795// FAKEDIR: "-internal-isystem" "/fake{{/|\\\\}}include"796// FAKEDIR: "-internal-isystem" "/fake{{/|\\\\}}atlmfc{{/|\\\\}}include"797// FAKEDIR: "-internal-isystem" "/foo{{/|\\\\}}Include{{/|\\\\}}10.0.12345.0{{/|\\\\}}ucrt"798// FAKEDIR: "-internal-isystem" "/foo{{/|\\\\}}Include{{/|\\\\}}10.0.12345.0{{/|\\\\}}shared"799// FAKEDIR: "-internal-isystem" "/foo{{/|\\\\}}Include{{/|\\\\}}10.0.12345.0{{/|\\\\}}um"800// FAKEDIR: "-internal-isystem" "/foo{{/|\\\\}}Include{{/|\\\\}}10.0.12345.0{{/|\\\\}}winrt"801// FAKEDIR: "-libpath:/fake{{/|\\\\}}lib{{/|\\\\}}802// FAKEDIR: "-libpath:/fake{{/|\\\\}}atlmfc{{/|\\\\}}lib{{/|\\\\}}803// FAKEDIR: "-libpath:/foo{{/|\\\\}}Lib{{/|\\\\}}10.0.12345.0{{/|\\\\}}ucrt804// FAKEDIR: "-libpath:/foo{{/|\\\\}}Lib{{/|\\\\}}10.0.12345.0{{/|\\\\}}um805 806// Accept both the -target and --target= spellings.807// RUN: %clang_cl --target=i686-pc-windows-msvc19.14.0 -### -- %s 2>&1 | FileCheck -check-prefix=TARGET %s808// RUN: %clang_cl -target i686-pc-windows-msvc19.14.0  -### -- %s 2>&1 | FileCheck -check-prefix=TARGET %s809// TARGET: "-triple" "i686-pc-windows-msvc19.14.0"810 811// RUN: %clang_cl /JMC /c -### -- %s 2>&1 | FileCheck %s --check-prefix JMCWARN812// JMCWARN: /JMC requires debug info. Use '/Zi', '/Z7' or debug options that enable debugger's stepping function; option ignored813 814// RUN: %clang_cl /JMC /c -### -- %s 2>&1 | FileCheck %s --check-prefix NOJMC815// RUN: %clang_cl /JMC /Z7 /JMC- /c -### -- %s 2>&1 | FileCheck %s --check-prefix NOJMC816// NOJMC-NOT: -fjmc817 818// RUN: %clang_cl /JMC /Z7 /c -### -- %s 2>&1 | FileCheck %s --check-prefix JMC819// JMC: -fjmc820 821// RUN: %clang_cl /external:W0 /c -### -- %s 2>&1 | FileCheck -check-prefix=EXTERNAL_W0 %s822// RUN: %clang_cl /external:W1 /c -### -- %s 2>&1 | FileCheck -check-prefix=EXTERNAL_Wn %s823// RUN: %clang_cl /external:W2 /c -### -- %s 2>&1 | FileCheck -check-prefix=EXTERNAL_Wn %s824// RUN: %clang_cl /external:W3 /c -### -- %s 2>&1 | FileCheck -check-prefix=EXTERNAL_Wn %s825// RUN: %clang_cl /external:W4 /c -### -- %s 2>&1 | FileCheck -check-prefix=EXTERNAL_Wn %s826// EXTERNAL_W0: "-Wno-system-headers"827// EXTERNAL_Wn: "-Wsystem-headers"828 829// RUN: %clang_cl -vctoolsdir "" /arm64EC /c -### -- %s 2>&1 | FileCheck --check-prefix=ARM64EC %s 830// ARM64EC-NOT: /arm64EC has been overridden by specified target831// ARM64EC: "-triple" "arm64ec-pc-windows-msvc19.33.0"832// ARM64EC-SAME: "--dependent-lib=softintrin"833 834// RUN: %clang_cl -vctoolsdir "" /arm64EC /c -target x86_64-pc-windows-msvc  -### -- %s 2>&1 | FileCheck --check-prefix=ARM64EC_OVERRIDE %s835// ARM64EC_OVERRIDE: warning: /arm64EC has been overridden by specified target: x86_64-pc-windows-msvc; option ignored836 837// RUN: %clang_cl /d2epilogunwind /c -### -- %s 2>&1 | FileCheck %s --check-prefix=EPILOGUNWIND838// EPILOGUNWIND: -fwinx64-eh-unwindv2=best-effort839 840// RUN: %clang_cl /d2epilogunwindrequirev2 /c -### -- %s 2>&1 | FileCheck %s --check-prefix=EPILOGUNWINDREQUIREV2841// RUN: %clang_cl /d2epilogunwindrequirev2 /d2epilogunwind /c -### -- %s 2>&1 | FileCheck %s --check-prefix=EPILOGUNWINDREQUIREV2842// EPILOGUNWINDREQUIREV2: -fwinx64-eh-unwindv2=require843 844// RUN: %clang_cl /funcoverride:override_me1 /funcoverride:override_me2 /c -### -- %s 2>&1 | FileCheck %s --check-prefix=FUNCOVERRIDE845// FUNCOVERRIDE: -loader-replaceable-function=override_me1846// FUNCOVERRIDE-SAME: -loader-replaceable-function=override_me2847 848void f(void) { }849