Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 1 | // RUN: %clang -E -fexceptions %s -o - | FileCheck --check-prefix=CHECK-EXCEPTIONS %s |
| 2 | // RUN: %clang -E -fexceptions -fno-cxx-exceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s |
| 3 | // RUN: %clang -E -fno-exceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s |
| 4 | |
| 5 | // RUN: %clang_cc1 -E -fcxx-exceptions %s -o - | FileCheck --check-prefix=CHECK-EXCEPTIONS %s |
| 6 | // RUN: %clang_cc1 -E -fobjc-exceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s |
| 7 | // RUN: %clang_cc1 -E -fexceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s |
Daniel Dunbar | eefb6ab | 2010-06-29 16:52:24 +0000 | [diff] [blame] | 8 | // RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s |
Ted Kremenek | 0f3cb47 | 2009-12-03 01:34:15 +0000 | [diff] [blame] | 9 | |
| 10 | #if __has_feature(cxx_exceptions) |
| 11 | int foo(); |
| 12 | #else |
| 13 | int bar(); |
| 14 | #endif |
| 15 | |
| 16 | // CHECK-EXCEPTIONS: foo |
| 17 | // CHECK-NO-EXCEPTIONS: bar |