blob: e80d39b9419a406e96431b7471204cd58550ed30 [file] [log] [blame]
Reid Klecknerc542d372014-06-27 17:02:02 +00001// Don't attempt slash switches on msys bash.
2// REQUIRES: shell-preserves-root
3
4// Note: %s must be preceded by --, otherwise it may be interpreted as a
5// command-line option, e.g. on Mac where %s is commonly under /Users.
6
Reid Kleckner0bb1fc42015-07-10 22:25:44 +00007// RUN: %clang_cl /c /EHsc -fexceptions -### -- %s 2>&1 | FileCheck -check-prefix=EHscfex %s
8// EHscfex: "-fcxx-exceptions"
9// EHscfex: "-fexceptions"
10
Reid Klecknerc542d372014-06-27 17:02:02 +000011// RUN: %clang_cl /c /EHsc -### -- %s 2>&1 | FileCheck -check-prefix=EHsc %s
Reid Kleckner0bb1fc42015-07-10 22:25:44 +000012// EHsc-NOT: "-fcxx-exceptions"
13// EHsc-NOT: "-fexceptions"
Reid Klecknerc542d372014-06-27 17:02:02 +000014
15// RUN: %clang_cl /c /EHs-c- -### -- %s 2>&1 | FileCheck -check-prefix=EHs_c_ %s
Reid Klecknerab80f182015-01-30 01:04:16 +000016// EHs_c_-NOT: "-fcxx-exceptions"
Reid Klecknerdeeddec2015-02-05 18:56:03 +000017// EHs_c_-NOT: "-fexceptions"
Reid Klecknerc542d372014-06-27 17:02:02 +000018
19// RUN: %clang_cl /c /EHs- /EHc- -### -- %s 2>&1 | FileCheck -check-prefix=EHs_EHc_ %s
Reid Klecknerab80f182015-01-30 01:04:16 +000020// EHs_EHc_-NOT: "-fcxx-exceptions"
Reid Klecknerdeeddec2015-02-05 18:56:03 +000021// EHs_EHc_-NOT: "-fexceptions"
Reid Klecknerc542d372014-06-27 17:02:02 +000022
Reid Kleckner0bb1fc42015-07-10 22:25:44 +000023// RUN: %clang_cl /c /EHs- /EHs -fexceptions -### -- %s 2>&1 | FileCheck -check-prefix=EHs_EHs %s
Reid Klecknerab80f182015-01-30 01:04:16 +000024// EHs_EHs: "-fcxx-exceptions"
Reid Klecknerc542d372014-06-27 17:02:02 +000025// EHs_EHs: "-fexceptions"
26
Reid Kleckner0bb1fc42015-07-10 22:25:44 +000027// RUN: %clang_cl /c /EHs- /EHsa -fexceptions -### -- %s 2>&1 | FileCheck -check-prefix=EHs_EHa %s
Reid Klecknerab80f182015-01-30 01:04:16 +000028// EHs_EHa: "-fcxx-exceptions"
Reid Klecknerc542d372014-06-27 17:02:02 +000029// EHs_EHa: "-fexceptions"
30
Reid Kleckner0bb1fc42015-07-10 22:25:44 +000031// RUN: %clang_cl /c /EHinvalid -fexceptions -### -- %s 2>&1 | FileCheck -check-prefix=EHinvalid %s
Reid Klecknerc542d372014-06-27 17:02:02 +000032// EHinvalid: error: invalid value 'invalid' in '/EH'
33// EHinvalid-NOT: error: