32 lines · cpp
1// Note: %s must be preceded by --, otherwise it may be interpreted as a2// 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 %s5// EHsc: "-fcxx-exceptions"6// EHsc: "-fexceptions"7 8// RUN: %clang_cl /c /EHs-c- -### -- %s 2>&1 | FileCheck -check-prefix=EHs_c_ %s9// 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_ %s13// 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 %s17// EHs_EHs: "-fcxx-exceptions"18// EHs_EHs: "-fexceptions"19 20// RUN: %clang_cl /c /EHs- /EHsa -### -- %s 2>&1 | FileCheck -check-prefix=EHs_EHa %s21// EHs_EHa: "-fcxx-exceptions"22// EHs_EHa: "-fexceptions"23 24// RUN: %clang_cl /c /EHa /EHc -### -- %s 2>&1 | FileCheck -check-prefix=EHa_EHc %s25// 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 %s30// EHinvalid: error: invalid value 'invalid' in '/EH'31// EHinvalid-NOT: error:32