1 // 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 
7 // FIXME: When C++ EH works, we can make this flag turn things back on.
8 
9 // RUN: %clang_cl /c /EHsc -### -- %s 2>&1 | FileCheck -check-prefix=EHsc %s
10 // EHsc-NOT: "-fcxx-exceptions"
11 // EHsc-NOT: "-fexceptions"
12 
13 // RUN: %clang_cl /c /EHs-c- -### -- %s 2>&1 | FileCheck -check-prefix=EHs_c_ %s
14 // EHs_c_-NOT: "-fcxx-exceptions"
15 // EHs_c_-NOT: "-fexceptions"
16 
17 // RUN: %clang_cl /c /EHs- /EHc- -### -- %s 2>&1 | FileCheck -check-prefix=EHs_EHc_ %s
18 // EHs_EHc_-NOT: "-fcxx-exceptions"
19 // EHs_EHc_-NOT: "-fexceptions"
20 
21 // 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"
24 
25 // 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"
28 
29 // RUN: %clang_cl /c /EHinvalid -### -- %s 2>&1 | FileCheck -check-prefix=EHinvalid %s
30 // EHinvalid: error: invalid value 'invalid' in '/EH'
31 // EHinvalid-NOT: error:
32