David Majnemer 8ef921a48b Frontend: Define __EXCEPTIONS if -fexceptions is passed
GCC defines __EXCEPTIONS, regardless of language mode, if -fexceptions
is passed.  We should do the same.

This fixes PR21358.

llvm-svn: 220714
2014-10-27 20:02:19 +00:00

10 lines
303 B
C

// RUN: %clang_cc1 -fms-compatibility -fexceptions -fcxx-exceptions -DMS_MODE -verify %s
// expected-no-diagnostics
// RUN: %clang_cc1 -fms-compatibility -fexceptions -verify %s
// expected-no-diagnostics
#if defined(MS_MODE) && defined(__EXCEPTIONS)
#error __EXCEPTIONS should not be defined.
#endif