diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-10-27 20:02:19 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-10-27 20:02:19 +0000 |
commit | 8ef921a48b2cf8a4e4923a6210d2e96060ebce1d (patch) | |
tree | 9f03499dd77004ca8603916916108115ed0aa1c5 /clang/test/Frontend/exceptions.c | |
parent | 7ccebec66883b6e97a22a4e711b7c4585e94a186 (diff) | |
download | bcm5719-llvm-8ef921a48b2cf8a4e4923a6210d2e96060ebce1d.tar.gz bcm5719-llvm-8ef921a48b2cf8a4e4923a6210d2e96060ebce1d.zip |
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
Diffstat (limited to 'clang/test/Frontend/exceptions.c')
-rw-r--r-- | clang/test/Frontend/exceptions.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/test/Frontend/exceptions.c b/clang/test/Frontend/exceptions.c index 4bbaaa39bfa..981b5b9045b 100644 --- a/clang/test/Frontend/exceptions.c +++ b/clang/test/Frontend/exceptions.c @@ -1,6 +1,9 @@ -// RUN: %clang_cc1 -fms-compatibility -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fms-compatibility -fexceptions -fcxx-exceptions -DMS_MODE -verify %s // expected-no-diagnostics -#if defined(__EXCEPTIONS) +// RUN: %clang_cc1 -fms-compatibility -fexceptions -verify %s +// expected-no-diagnostics + +#if defined(MS_MODE) && defined(__EXCEPTIONS) #error __EXCEPTIONS should not be defined. #endif |