1f4a2713aSLionel Sambuc // Don't attempt slash switches on msys bash. 2f4a2713aSLionel Sambuc // REQUIRES: shell-preserves-root 3f4a2713aSLionel Sambuc 4f4a2713aSLionel Sambuc // Note: %s must be preceded by --, otherwise it may be interpreted as a 5f4a2713aSLionel Sambuc // command-line option, e.g. on Mac where %s is commonly under /Users. 6f4a2713aSLionel Sambuc 7f4a2713aSLionel Sambuc 8f4a2713aSLionel Sambuc // Alias options: 9f4a2713aSLionel Sambuc 10*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=c %s 11*0a6a1f1dSLionel Sambuc // c: -c 12*0a6a1f1dSLionel Sambuc 13*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /C -### -- %s 2>&1 | FileCheck -check-prefix=C %s 14*0a6a1f1dSLionel Sambuc // C: error: invalid argument '-C' only allowed with '/E, /P or /EP' 15*0a6a1f1dSLionel Sambuc 16*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /C /P -### -- %s 2>&1 | FileCheck -check-prefix=C_P %s 17*0a6a1f1dSLionel Sambuc // C_P: "-E" 18*0a6a1f1dSLionel Sambuc // C_P: "-C" 19f4a2713aSLionel Sambuc 20f4a2713aSLionel Sambuc // RUN: %clang_cl /Dfoo=bar -### -- %s 2>&1 | FileCheck -check-prefix=D %s 21f4a2713aSLionel Sambuc // RUN: %clang_cl /D foo=bar -### -- %s 2>&1 | FileCheck -check-prefix=D %s 22f4a2713aSLionel Sambuc // D: "-D" "foo=bar" 23f4a2713aSLionel Sambuc 24*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /E -### -- %s 2>&1 | FileCheck -check-prefix=E %s 25*0a6a1f1dSLionel Sambuc // E: "-E" 26*0a6a1f1dSLionel Sambuc // E: "-o" "-" 27*0a6a1f1dSLionel Sambuc 28*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /EP -### -- %s 2>&1 | FileCheck -check-prefix=EP %s 29*0a6a1f1dSLionel Sambuc // EP: "-E" 30*0a6a1f1dSLionel Sambuc // EP: "-P" 31*0a6a1f1dSLionel Sambuc // EP: "-o" "-" 32*0a6a1f1dSLionel Sambuc 33f4a2713aSLionel Sambuc // RTTI is on by default; just check that we don't error. 34f4a2713aSLionel Sambuc // RUN: %clang_cl /Zs /GR -- %s 2>&1 35f4a2713aSLionel Sambuc 36f4a2713aSLionel Sambuc // RUN: %clang_cl /GR- -### -- %s 2>&1 | FileCheck -check-prefix=GR_ %s 37f4a2713aSLionel Sambuc // GR_: -fno-rtti 38f4a2713aSLionel Sambuc 39*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /Gy -### -- %s 2>&1 | FileCheck -check-prefix=Gy %s 40*0a6a1f1dSLionel Sambuc // Gy: -ffunction-sections 41*0a6a1f1dSLionel Sambuc 42*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /Gy /Gy- -### -- %s 2>&1 | FileCheck -check-prefix=Gy_ %s 43*0a6a1f1dSLionel Sambuc // Gy_-NOT: -ffunction-sections 44*0a6a1f1dSLionel Sambuc 45*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /Gw -### -- %s 2>&1 | FileCheck -check-prefix=Gw %s 46*0a6a1f1dSLionel Sambuc // Gw: -fdata-sections 47*0a6a1f1dSLionel Sambuc 48*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /Gw /Gw- -### -- %s 2>&1 | FileCheck -check-prefix=Gw_ %s 49*0a6a1f1dSLionel Sambuc // Gw_-NOT: -fdata-sections 50*0a6a1f1dSLionel Sambuc 51f4a2713aSLionel Sambuc // RUN: %clang_cl /Imyincludedir -### -- %s 2>&1 | FileCheck -check-prefix=SLASH_I %s 52f4a2713aSLionel Sambuc // RUN: %clang_cl /I myincludedir -### -- %s 2>&1 | FileCheck -check-prefix=SLASH_I %s 53f4a2713aSLionel Sambuc // SLASH_I: "-I" "myincludedir" 54f4a2713aSLionel Sambuc 55f4a2713aSLionel Sambuc // RUN: %clang_cl /J -### -- %s 2>&1 | FileCheck -check-prefix=J %s 56f4a2713aSLionel Sambuc // J: -fno-signed-char 57f4a2713aSLionel Sambuc 58f4a2713aSLionel Sambuc // RUN: %clang_cl /Ofoo -### -- %s 2>&1 | FileCheck -check-prefix=O %s 59f4a2713aSLionel Sambuc // O: -Ofoo 60f4a2713aSLionel Sambuc 61f4a2713aSLionel Sambuc // RUN: %clang_cl /Ob0 -### -- %s 2>&1 | FileCheck -check-prefix=Ob0 %s 62f4a2713aSLionel Sambuc // Ob0: -fno-inline 63f4a2713aSLionel Sambuc 64f4a2713aSLionel Sambuc // RUN: %clang_cl /Od -### -- %s 2>&1 | FileCheck -check-prefix=Od %s 65f4a2713aSLionel Sambuc // Od: -O0 66f4a2713aSLionel Sambuc 67f4a2713aSLionel Sambuc // RUN: %clang_cl /Oi- /Oi -### -- %s 2>&1 | FileCheck -check-prefix=Oi %s 68f4a2713aSLionel Sambuc // Oi-NOT: -fno-builtin 69f4a2713aSLionel Sambuc 70f4a2713aSLionel Sambuc // RUN: %clang_cl /Oi- -### -- %s 2>&1 | FileCheck -check-prefix=Oi_ %s 71f4a2713aSLionel Sambuc // Oi_: -fno-builtin 72f4a2713aSLionel Sambuc 73f4a2713aSLionel Sambuc // RUN: %clang_cl /Os -### -- %s 2>&1 | FileCheck -check-prefix=Os %s 74f4a2713aSLionel Sambuc // Os: -Os 75f4a2713aSLionel Sambuc 76f4a2713aSLionel Sambuc // RUN: %clang_cl /Ot -### -- %s 2>&1 | FileCheck -check-prefix=Ot %s 77f4a2713aSLionel Sambuc // Ot: -O2 78f4a2713aSLionel Sambuc 79f4a2713aSLionel Sambuc // RUN: %clang_cl /Ox -### -- %s 2>&1 | FileCheck -check-prefix=Ox %s 80f4a2713aSLionel Sambuc // Ox: -O3 81f4a2713aSLionel Sambuc 82f4a2713aSLionel Sambuc // RUN: %clang_cl /Zs /Oy -- %s 2>&1 83f4a2713aSLionel Sambuc 84f4a2713aSLionel Sambuc // RUN: %clang_cl /Oy- -### -- %s 2>&1 | FileCheck -check-prefix=Oy_ %s 85f4a2713aSLionel Sambuc // Oy_: -mdisable-fp-elim 86f4a2713aSLionel Sambuc 87f4a2713aSLionel Sambuc // RUN: %clang_cl /showIncludes -### -- %s 2>&1 | FileCheck -check-prefix=showIncludes %s 88f4a2713aSLionel Sambuc // showIncludes: --show-includes 89f4a2713aSLionel Sambuc 90*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /E /showIncludes -### -- %s 2>&1 | FileCheck -check-prefix=showIncludes_E %s 91*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /EP /showIncludes -### -- %s 2>&1 | FileCheck -check-prefix=showIncludes_E %s 92*0a6a1f1dSLionel Sambuc // showIncludes_E: warning: argument unused during compilation: '--show-includes' 93*0a6a1f1dSLionel Sambuc 94f4a2713aSLionel Sambuc // RUN: %clang_cl /Umymacro -### -- %s 2>&1 | FileCheck -check-prefix=U %s 95f4a2713aSLionel Sambuc // RUN: %clang_cl /U mymacro -### -- %s 2>&1 | FileCheck -check-prefix=U %s 96f4a2713aSLionel Sambuc // U: "-U" "mymacro" 97f4a2713aSLionel Sambuc 98*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /vd2 -### -- %s 2>&1 | FileCheck -check-prefix=VD2 %s 99*0a6a1f1dSLionel Sambuc // VD2: -vtordisp-mode=2 100*0a6a1f1dSLionel Sambuc 101*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /vmg -### -- %s 2>&1 | FileCheck -check-prefix=VMG %s 102*0a6a1f1dSLionel Sambuc // VMG: "-fms-memptr-rep=virtual" 103*0a6a1f1dSLionel Sambuc 104*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /vmg /vms -### -- %s 2>&1 | FileCheck -check-prefix=VMS %s 105*0a6a1f1dSLionel Sambuc // VMS: "-fms-memptr-rep=single" 106*0a6a1f1dSLionel Sambuc 107*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /vmg /vmm -### -- %s 2>&1 | FileCheck -check-prefix=VMM %s 108*0a6a1f1dSLionel Sambuc // VMM: "-fms-memptr-rep=multiple" 109*0a6a1f1dSLionel Sambuc 110*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /vmg /vmv -### -- %s 2>&1 | FileCheck -check-prefix=VMV %s 111*0a6a1f1dSLionel Sambuc // VMV: "-fms-memptr-rep=virtual" 112*0a6a1f1dSLionel Sambuc 113*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /vmg /vmb -### -- %s 2>&1 | FileCheck -check-prefix=VMB %s 114*0a6a1f1dSLionel Sambuc // VMB: '/vmg' not allowed with '/vmb' 115*0a6a1f1dSLionel Sambuc 116*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /vmg /vmm /vms -### -- %s 2>&1 | FileCheck -check-prefix=VMX %s 117*0a6a1f1dSLionel Sambuc // VMX: '/vms' not allowed with '/vmm' 118*0a6a1f1dSLionel Sambuc 119f4a2713aSLionel Sambuc // RUN: %clang_cl /W0 -### -- %s 2>&1 | FileCheck -check-prefix=W0 %s 120f4a2713aSLionel Sambuc // W0: -w 121f4a2713aSLionel Sambuc 122f4a2713aSLionel Sambuc // RUN: %clang_cl /W1 -### -- %s 2>&1 | FileCheck -check-prefix=W1 %s 123f4a2713aSLionel Sambuc // RUN: %clang_cl /W2 -### -- %s 2>&1 | FileCheck -check-prefix=W1 %s 124f4a2713aSLionel Sambuc // RUN: %clang_cl /W3 -### -- %s 2>&1 | FileCheck -check-prefix=W1 %s 125f4a2713aSLionel Sambuc // RUN: %clang_cl /W4 -### -- %s 2>&1 | FileCheck -check-prefix=W1 %s 126f4a2713aSLionel Sambuc // RUN: %clang_cl /Wall -### -- %s 2>&1 | FileCheck -check-prefix=W1 %s 127f4a2713aSLionel Sambuc // W1: -Wall 128f4a2713aSLionel Sambuc 129f4a2713aSLionel Sambuc // RUN: %clang_cl /WX -### -- %s 2>&1 | FileCheck -check-prefix=WX %s 130f4a2713aSLionel Sambuc // WX: -Werror 131f4a2713aSLionel Sambuc 132f4a2713aSLionel Sambuc // RUN: %clang_cl /WX- -### -- %s 2>&1 | FileCheck -check-prefix=WX_ %s 133f4a2713aSLionel Sambuc // WX_: -Wno-error 134f4a2713aSLionel Sambuc 135f4a2713aSLionel Sambuc // RUN: %clang_cl /w -### -- %s 2>&1 | FileCheck -check-prefix=w %s 136f4a2713aSLionel Sambuc // w: -w 137f4a2713aSLionel Sambuc 138*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /Zp -### -- %s 2>&1 | FileCheck -check-prefix=ZP %s 139*0a6a1f1dSLionel Sambuc // ZP: -fpack-struct=1 140*0a6a1f1dSLionel Sambuc 141*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /Zp2 -### -- %s 2>&1 | FileCheck -check-prefix=ZP2 %s 142*0a6a1f1dSLionel Sambuc // ZP2: -fpack-struct=2 143*0a6a1f1dSLionel Sambuc 144f4a2713aSLionel Sambuc // RUN: %clang_cl /Zs -### -- %s 2>&1 | FileCheck -check-prefix=Zs %s 145f4a2713aSLionel Sambuc // Zs: -fsyntax-only 146f4a2713aSLionel Sambuc 147f4a2713aSLionel Sambuc // RUN: %clang_cl /FIasdf.h -### -- %s 2>&1 | FileCheck -check-prefix=FI %s 148f4a2713aSLionel Sambuc // FI: "-include" "asdf.h" 149f4a2713aSLionel Sambuc 150f4a2713aSLionel Sambuc // RUN: %clang_cl /FI asdf.h -### -- %s 2>&1 | FileCheck -check-prefix=FI_ %s 151f4a2713aSLionel Sambuc // FI_: "-include" "asdf.h" 152f4a2713aSLionel Sambuc 153f4a2713aSLionel Sambuc // We forward any unrecognized -W diagnostic options to cc1. 154f4a2713aSLionel Sambuc // RUN: %clang_cl -Wunused-pragmas -### -- %s 2>&1 | FileCheck -check-prefix=WJoined %s 155f4a2713aSLionel Sambuc // WJoined: "-cc1" 156f4a2713aSLionel Sambuc // WJoined: "-Wunused-pragmas" 157f4a2713aSLionel Sambuc 158*0a6a1f1dSLionel Sambuc // We recognize -f[no-]strict-aliasing. 159*0a6a1f1dSLionel Sambuc // RUN: %clang_cl -c -### -- %s 2>&1 | FileCheck -check-prefix=DEFAULTSTRICT %s 160*0a6a1f1dSLionel Sambuc // DEFAULTSTRICT: "-relaxed-aliasing" 161*0a6a1f1dSLionel Sambuc // RUN: %clang_cl -c -fstrict-aliasing -### -- %s 2>&1 | FileCheck -check-prefix=STRICT %s 162*0a6a1f1dSLionel Sambuc // STRICT-NOT: "-relaxed-aliasing" 163*0a6a1f1dSLionel Sambuc // RUN: %clang_cl -c -fno-strict-aliasing -### -- %s 2>&1 | FileCheck -check-prefix=NOSTRICT %s 164*0a6a1f1dSLionel Sambuc // NOSTRICT: "-relaxed-aliasing" 165*0a6a1f1dSLionel Sambuc 166*0a6a1f1dSLionel Sambuc // For some warning ids, we can map from MSVC warning to Clang warning. 167*0a6a1f1dSLionel Sambuc // RUN: %clang_cl -wd4005 -### -- %s 2>&1 | FileCheck -check-prefix=wd4005 %s 168*0a6a1f1dSLionel Sambuc // wd4005: "-cc1" 169*0a6a1f1dSLionel Sambuc // wd4005: "-Wno-macro-redefined" 170f4a2713aSLionel Sambuc 171f4a2713aSLionel Sambuc // Ignored options. Check that we don't get "unused during compilation" errors. 172*0a6a1f1dSLionel Sambuc // (/Zs is for syntax-only) 173*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /Zs \ 174f4a2713aSLionel Sambuc // RUN: /analyze- \ 175*0a6a1f1dSLionel Sambuc // RUN: /cgthreads4 \ 176*0a6a1f1dSLionel Sambuc // RUN: /cgthreads8 \ 177*0a6a1f1dSLionel Sambuc // RUN: /d2Zi+ \ 178f4a2713aSLionel Sambuc // RUN: /errorReport:foo \ 179f4a2713aSLionel Sambuc // RUN: /FS \ 180*0a6a1f1dSLionel Sambuc // RUN: /Gd \ 181f4a2713aSLionel Sambuc // RUN: /GF \ 182f4a2713aSLionel Sambuc // RUN: /GS- \ 183f4a2713aSLionel Sambuc // RUN: /kernel- \ 184f4a2713aSLionel Sambuc // RUN: /nologo \ 185f4a2713aSLionel Sambuc // RUN: /Ob1 \ 186f4a2713aSLionel Sambuc // RUN: /Ob2 \ 187f4a2713aSLionel Sambuc // RUN: /RTC1 \ 188f4a2713aSLionel Sambuc // RUN: /sdl \ 189f4a2713aSLionel Sambuc // RUN: /sdl- \ 190f4a2713aSLionel Sambuc // RUN: /vmg \ 191*0a6a1f1dSLionel Sambuc // RUN: /volatile:iso \ 192f4a2713aSLionel Sambuc // RUN: /w12345 \ 193f4a2713aSLionel Sambuc // RUN: /wd1234 \ 194*0a6a1f1dSLionel Sambuc // RUN: /Zo \ 195*0a6a1f1dSLionel Sambuc // RUN: /Zo- \ 196*0a6a1f1dSLionel Sambuc // RUN: -### -- %s 2>&1 | FileCheck -check-prefix=IGNORED %s 197*0a6a1f1dSLionel Sambuc // IGNORED-NOT: argument unused during compilation 198*0a6a1f1dSLionel Sambuc // IGNORED-NOT: no such file or directory 199f4a2713aSLionel Sambuc 200f4a2713aSLionel Sambuc // Ignored options and compile-only options are ignored for link jobs. 201f4a2713aSLionel Sambuc // RUN: touch %t.obj 202f4a2713aSLionel Sambuc // RUN: %clang_cl /nologo -### -- %t.obj 2>&1 | FileCheck -check-prefix=LINKUNUSED %s 203f4a2713aSLionel Sambuc // RUN: %clang_cl /Dfoo -### -- %t.obj 2>&1 | FileCheck -check-prefix=LINKUNUSED %s 204f4a2713aSLionel Sambuc // RUN: %clang_cl /MD -### -- %t.obj 2>&1 | FileCheck -check-prefix=LINKUNUSED %s 205f4a2713aSLionel Sambuc // LINKUNUSED-NOT: argument unused during compilation 206f4a2713aSLionel Sambuc 207f4a2713aSLionel Sambuc // Support ignoring warnings about unused arguments. 208f4a2713aSLionel Sambuc // RUN: %clang_cl /Abracadabra -Qunused-arguments -### -- %s 2>&1 | FileCheck -check-prefix=UNUSED %s 209*0a6a1f1dSLionel Sambuc // UNUSED-NOT: argument unused during compilation 210f4a2713aSLionel Sambuc 211f4a2713aSLionel Sambuc // Unsupported but parsed options. Check that we don't error on them. 212f4a2713aSLionel Sambuc // (/Zs is for syntax-only) 213f4a2713aSLionel Sambuc // RUN: %clang_cl /Zs \ 214f4a2713aSLionel Sambuc // RUN: /AIfoo \ 215f4a2713aSLionel Sambuc // RUN: /clr:pure \ 216f4a2713aSLionel Sambuc // RUN: /docname \ 217f4a2713aSLionel Sambuc // RUN: /EHsc \ 218f4a2713aSLionel Sambuc // RUN: /F \ 219f4a2713aSLionel Sambuc // RUN: /FA \ 220f4a2713aSLionel Sambuc // RUN: /FAc \ 221f4a2713aSLionel Sambuc // RUN: /Fafilename \ 222f4a2713aSLionel Sambuc // RUN: /FAs \ 223f4a2713aSLionel Sambuc // RUN: /FAu \ 224f4a2713aSLionel Sambuc // RUN: /favor:blend \ 225f4a2713aSLionel Sambuc // RUN: /FC \ 226f4a2713aSLionel Sambuc // RUN: /Fdfoo \ 227f4a2713aSLionel Sambuc // RUN: /Fifoo \ 228f4a2713aSLionel Sambuc // RUN: /Fmfoo \ 229f4a2713aSLionel Sambuc // RUN: /FpDebug\main.pch \ 230f4a2713aSLionel Sambuc // RUN: /fp:precise \ 231f4a2713aSLionel Sambuc // RUN: /Frfoo \ 232f4a2713aSLionel Sambuc // RUN: /FRfoo \ 233f4a2713aSLionel Sambuc // RUN: /FU foo \ 234f4a2713aSLionel Sambuc // RUN: /Fx \ 235f4a2713aSLionel Sambuc // RUN: /G1 \ 236f4a2713aSLionel Sambuc // RUN: /G2 \ 237f4a2713aSLionel Sambuc // RUN: /GA \ 238f4a2713aSLionel Sambuc // RUN: /Gd \ 239f4a2713aSLionel Sambuc // RUN: /Ge \ 240f4a2713aSLionel Sambuc // RUN: /Gh \ 241f4a2713aSLionel Sambuc // RUN: /GH \ 242f4a2713aSLionel Sambuc // RUN: /GL \ 243f4a2713aSLionel Sambuc // RUN: /GL- \ 244f4a2713aSLionel Sambuc // RUN: /Gm \ 245f4a2713aSLionel Sambuc // RUN: /Gm- \ 246f4a2713aSLionel Sambuc // RUN: /Gr \ 247f4a2713aSLionel Sambuc // RUN: /GS \ 248f4a2713aSLionel Sambuc // RUN: /Gs1000 \ 249f4a2713aSLionel Sambuc // RUN: /GT \ 250f4a2713aSLionel Sambuc // RUN: /GX \ 251*0a6a1f1dSLionel Sambuc // RUN: /Gv \ 252f4a2713aSLionel Sambuc // RUN: /Gz \ 253f4a2713aSLionel Sambuc // RUN: /GZ \ 254f4a2713aSLionel Sambuc // RUN: /H \ 255f4a2713aSLionel Sambuc // RUN: /homeparams \ 256f4a2713aSLionel Sambuc // RUN: /hotpatch \ 257f4a2713aSLionel Sambuc // RUN: /kernel \ 258f4a2713aSLionel Sambuc // RUN: /LN \ 259f4a2713aSLionel Sambuc // RUN: /MP \ 260f4a2713aSLionel Sambuc // RUN: /o foo.obj \ 261f4a2713aSLionel Sambuc // RUN: /ofoo.obj \ 262f4a2713aSLionel Sambuc // RUN: /openmp \ 263f4a2713aSLionel Sambuc // RUN: /Qfast_transcendentals \ 264f4a2713aSLionel Sambuc // RUN: /QIfist \ 265f4a2713aSLionel Sambuc // RUN: /Qimprecise_fwaits \ 266f4a2713aSLionel Sambuc // RUN: /Qpar \ 267f4a2713aSLionel Sambuc // RUN: /Qvec-report:2 \ 268f4a2713aSLionel Sambuc // RUN: /u \ 269f4a2713aSLionel Sambuc // RUN: /V \ 270*0a6a1f1dSLionel Sambuc // RUN: /volatile:ms \ 271f4a2713aSLionel Sambuc // RUN: /wfoo \ 272f4a2713aSLionel Sambuc // RUN: /WL \ 273f4a2713aSLionel Sambuc // RUN: /Wp64 \ 274f4a2713aSLionel Sambuc // RUN: /X \ 275f4a2713aSLionel Sambuc // RUN: /Y- \ 276f4a2713aSLionel Sambuc // RUN: /Yc \ 277f4a2713aSLionel Sambuc // RUN: /Ycstdafx.h \ 278f4a2713aSLionel Sambuc // RUN: /Yd \ 279f4a2713aSLionel Sambuc // RUN: /Yl- \ 280f4a2713aSLionel Sambuc // RUN: /Ylfoo \ 281f4a2713aSLionel Sambuc // RUN: /Yustdafx.h \ 282f4a2713aSLionel Sambuc // RUN: /Z7 \ 283f4a2713aSLionel Sambuc // RUN: /Za \ 284f4a2713aSLionel Sambuc // RUN: /Ze \ 285f4a2713aSLionel Sambuc // RUN: /Zg \ 286f4a2713aSLionel Sambuc // RUN: /Zi \ 287f4a2713aSLionel Sambuc // RUN: /ZI \ 288f4a2713aSLionel Sambuc // RUN: /Zl \ 289f4a2713aSLionel Sambuc // RUN: /ZW:nostdlib \ 290f4a2713aSLionel Sambuc // RUN: -- %s 2>&1 291f4a2713aSLionel Sambuc 292f4a2713aSLionel Sambuc // We support -Xclang for forwarding options to cc1. 293f4a2713aSLionel Sambuc // RUN: %clang_cl -Xclang hellocc1 -### -- %s 2>&1 | FileCheck -check-prefix=Xclang %s 294f4a2713aSLionel Sambuc // Xclang: "-cc1" 295f4a2713aSLionel Sambuc // Xclang: "hellocc1" 296f4a2713aSLionel Sambuc 297*0a6a1f1dSLionel Sambuc // RTTI is on by default. /GR- controls -fno-rtti-data. 298*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /GR- -### -- %s 2>&1 | FileCheck -check-prefix=NoRTTI %s 299*0a6a1f1dSLionel Sambuc // NoRTTI: "-fno-rtti-data" 300*0a6a1f1dSLionel Sambuc // NoRTTI-NOT: "-fno-rtti" 301*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /GR -### -- %s 2>&1 | FileCheck -check-prefix=RTTI %s 302*0a6a1f1dSLionel Sambuc // RTTI-NOT: "-fno-rtti-data" 303*0a6a1f1dSLionel Sambuc // RTTI-NOT: "-fno-rtti" 304*0a6a1f1dSLionel Sambuc 305*0a6a1f1dSLionel Sambuc // Accept "core" clang options. 306*0a6a1f1dSLionel Sambuc // (/Zs is for syntax-only) 307*0a6a1f1dSLionel Sambuc // RUN: %clang_cl \ 308*0a6a1f1dSLionel Sambuc // RUN: --driver-mode=cl \ 309*0a6a1f1dSLionel Sambuc // RUN: -ferror-limit=10 \ 310*0a6a1f1dSLionel Sambuc // RUN: -fmsc-version=1800 \ 311*0a6a1f1dSLionel Sambuc // RUN: -fno-strict-aliasing \ 312*0a6a1f1dSLionel Sambuc // RUN: -fstrict-aliasing \ 313*0a6a1f1dSLionel Sambuc // RUN: -mllvm -disable-llvm-optzns \ 314*0a6a1f1dSLionel Sambuc // RUN: -Wunused-variables \ 315*0a6a1f1dSLionel Sambuc // RUN: /Zs -- %s 2>&1 316f4a2713aSLionel Sambuc 317f4a2713aSLionel Sambuc f()318f4a2713aSLionel Sambucvoid f() { } 319