has_feature_exceptions.cpp revision 80737ad5e0a67d6e3dd0a0ba48446344215a5fd5
1// RUN: %clang -E -fexceptions %s -o - | FileCheck --check-prefix=CHECK-EXCEPTIONS %s 2// RUN: %clang -E -fno-exceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s 3 4#if __has_feature(cxx_exceptions) 5int foo(); 6#else 7int bar(); 8#endif 9 10// CHECK-EXCEPTIONS: foo 11// CHECK-NO-EXCEPTIONS: bar 12