| 1 |
// Note: %s must be preceded by --, otherwise it may be interpreted as a |
| 2 |
// command-line option, e.g. on Mac where %s is commonly under /Users. |
| 3 |
|
| 4 |
// RUN: %clang_cl /c /EHsc -### -- %s 2>&1 | FileCheck -check-prefix=EHsc %s |
| 5 |
// EHsc: "-fcxx-exceptions" |
| 6 |
// EHsc: "-fexceptions" |
| 7 |
|
| 8 |
// RUN: %clang_cl /c /EHs-c- -### -- %s 2>&1 | FileCheck -check-prefix=EHs_c_ %s |
| 9 |
// EHs_c_-NOT: "-fcxx-exceptions" |
| 10 |
// EHs_c_-NOT: "-fexceptions" |
| 11 |
|
| 12 |
// RUN: %clang_cl /c /EHs- /EHc- -### -- %s 2>&1 | FileCheck -check-prefix=EHs_EHc_ %s |
| 13 |
// EHs_EHc_-NOT: "-fcxx-exceptions" |
| 14 |
// EHs_EHc_-NOT: "-fexceptions" |
| 15 |
|
| 16 |
// RUN: %clang_cl /c /EHs- /EHs -### -- %s 2>&1 | FileCheck -check-prefix=EHs_EHs %s |
| 17 |
// EHs_EHs: "-fcxx-exceptions" |
| 18 |
// EHs_EHs: "-fexceptions" |
| 19 |
|
| 20 |
// RUN: %clang_cl /c /EHs- /EHsa -### -- %s 2>&1 | FileCheck -check-prefix=EHs_EHa %s |
| 21 |
// EHs_EHa: "-fcxx-exceptions" |
| 22 |
// EHs_EHa: "-fexceptions" |
| 23 |
|
| 24 |
// RUN: %clang_cl /c /EHa /EHc -### -- %s 2>&1 | FileCheck -check-prefix=EHa_EHc %s |
| 25 |
// EHa_EHc: "-fcxx-exceptions" |
| 26 |
// EHa_EHc: "-fexceptions" |
| 27 |
// EHa_EHc-NOT: "-fexternc-nounwind" |
| 28 |
|
| 29 |
// RUN: not %clang_cl /c /EHinvalid -### -- %s 2>&1 | FileCheck -check-prefix=EHinvalid %s |
| 30 |
// EHinvalid: error: invalid value 'invalid' in '/EH' |
| 31 |
// EHinvalid-NOT: error: |