[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Driver / cl-eh.cpp
blobc54544b385c1b2134a53660aeaad9d90e6ed77ff
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.
4 // RUN: %clang_cl /c /EHsc -### -- %s 2>&1 | FileCheck -check-prefix=EHsc %s
5 // EHsc: "-fcxx-exceptions"
6 // EHsc: "-fexceptions"
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"
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"
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"
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"
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"
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: