xref: /minix3/external/bsd/llvm/dist/clang/test/Lexer/has_feature_exceptions.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang -E -fexceptions %s -o - | FileCheck --check-prefix=CHECK-EXCEPTIONS %s
2*0a6a1f1dSLionel Sambuc // RUN: %clang -E -fexceptions -fno-cxx-exceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s
3*0a6a1f1dSLionel Sambuc // RUN: %clang -E -fno-exceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s
4*0a6a1f1dSLionel Sambuc 
5*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -E -fcxx-exceptions %s -o - | FileCheck --check-prefix=CHECK-EXCEPTIONS %s
6*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -E -fobjc-exceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s
7*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -E -fexceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s
8f4a2713aSLionel Sambuc // RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s
9f4a2713aSLionel Sambuc 
10f4a2713aSLionel Sambuc #if __has_feature(cxx_exceptions)
11f4a2713aSLionel Sambuc int foo();
12f4a2713aSLionel Sambuc #else
13f4a2713aSLionel Sambuc int bar();
14f4a2713aSLionel Sambuc #endif
15f4a2713aSLionel Sambuc 
16f4a2713aSLionel Sambuc // CHECK-EXCEPTIONS: foo
17f4a2713aSLionel Sambuc // CHECK-NO-EXCEPTIONS: bar
18