Check exception specification with __cplusplus.

To allow the compilation with gcc, we can't use the
__has_feature(cxx_noexcept) to detect the default destructor
exception specification, which is noexcept(true) by default
in C++11.  We should use __cplusplus >= 201103L instead.

llvm-svn: 208465
This commit is contained in:
Logan Chien 2014-05-10 00:40:54 +00:00
parent 59ad79601b
commit cc24fc546b
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ int gDestructorThrowTarget;
void throw_construct ( void *p ) { if ( gConstructorCounter == gConstructorThrowTarget ) throw 1; ++gConstructorCounter; }
void throw_destruct ( void *p ) { if ( ++gDestructorCounter == gDestructorThrowTarget ) throw 2; }
#if __has_feature(cxx_noexcept)
#if __cplusplus >= 201103L
# define CAN_THROW noexcept(false)
#else
# define CAN_THROW