summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLogan Chien <tzuhsiang.chien@gmail.com>2014-05-10 00:40:54 +0000
committerLogan Chien <tzuhsiang.chien@gmail.com>2014-05-10 00:40:54 +0000
commitcc24fc546bd94c953e8e832ff82311cfa7c4d6a7 (patch)
tree019fb2e85816f5cc5efa5eec90f40ba1395823b9
parent59ad79601bfb1254e1b0c2bc0a78fb33e3011429 (diff)
downloadbcm5719-llvm-cc24fc546bd94c953e8e832ff82311cfa7c4d6a7.tar.gz
bcm5719-llvm-cc24fc546bd94c953e8e832ff82311cfa7c4d6a7.zip
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
-rw-r--r--libcxxabi/test/test_vector1.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxxabi/test/test_vector1.cpp b/libcxxabi/test/test_vector1.cpp
index 29d39db5361..b8bf45c50c2 100644
--- a/libcxxabi/test/test_vector1.cpp
+++ b/libcxxabi/test/test_vector1.cpp
@@ -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
OpenPOWER on IntegriCloud