blob: b43f31f83fc784a15523b48c47afebdcc9392047 [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 Kleckner5c6efed2015-07-14 18:16:48 +00007// FIXME: When C++ EH works, we can make this flag turn things back on.
Reid Kleckner0bb1fc42015-07-10 22:25:44 +00008
Reid Klecknerc542d372014-06-27 17:02:02 +00009// RUN: %clang_cl /c /EHsc -### -- %s 2>&1 | FileCheck -check-prefix=EHsc %s
Reid Kleckner0bb1fc42015-07-10 22:25:44 +000010// EHsc-NOT: "-fcxx-exceptions"
11// EHsc-NOT: "-fexceptions"
Reid Klecknerc542d372014-06-27 17:02:02 +000012
13// RUN: %clang_cl /c /EHs-c- -### -- %s 2>&1 | FileCheck -check-prefix=EHs_c_ %s
Reid Klecknerab80f182015-01-30 01:04:16 +000014// EHs_c_-NOT: "-fcxx-exceptions"
Reid Klecknerdeeddec2015-02-05 18:56:03 +000015// EHs_c_-NOT: "-fexceptions"
Reid Klecknerc542d372014-06-27 17:02:02 +000016
17// RUN: %clang_cl /c /EHs- /EHc- -### -- %s 2>&1 | FileCheck -check-prefix=EHs_EHc_ %s
Reid Klecknerab80f182015-01-30 01:04:16 +000018// EHs_EHc_-NOT: "-fcxx-exceptions"
Reid Klecknerdeeddec2015-02-05 18:56:03 +000019// EHs_EHc_-NOT: "-fexceptions"
Reid Klecknerc542d372014-06-27 17:02:02 +000020
Reid Kleckner5c6efed2015-07-14 18:16:48 +000021// RUN: %clang_cl /c /EHs- /EHs -### -- %s 2>&1 | FileCheck -check-prefix=EHs_EHs %s
22// EHs_EHs-NOT: "-fcxx-exceptions"
23// EHs_EHs-NOT: "-fexceptions"
Reid Klecknerc542d372014-06-27 17:02:02 +000024
Reid Kleckner5c6efed2015-07-14 18:16:48 +000025// RUN: %clang_cl /c /EHs- /EHsa -### -- %s 2>&1 | FileCheck -check-prefix=EHs_EHa %s
26// EHs_EHa-NOT: "-fcxx-exceptions"
27// EHs_EHa-NOT: "-fexceptions"
Reid Klecknerc542d372014-06-27 17:02:02 +000028
Reid Kleckner5c6efed2015-07-14 18:16:48 +000029// RUN: %clang_cl /c /EHinvalid -### -- %s 2>&1 | FileCheck -check-prefix=EHinvalid %s
Reid Klecknerc542d372014-06-27 17:02:02 +000030// EHinvalid: error: invalid value 'invalid' in '/EH'
31// EHinvalid-NOT: error: