forked from OSchip/llvm-project
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:
parent
59ad79601b
commit
cc24fc546b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue