[libcxxabi] r208465 - Check exception specification with __cplusplus.
Logan Chien
tzuhsiang.chien at gmail.com
Fri May 9 17:40:54 PDT 2014
Author: logan
Date: Fri May 9 19:40:54 2014
New Revision: 208465
URL: http://llvm.org/viewvc/llvm-project?rev=208465&view=rev
Log:
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.
Modified:
libcxxabi/trunk/test/test_vector1.cpp
Modified: libcxxabi/trunk/test/test_vector1.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/test_vector1.cpp?rev=208465&r1=208464&r2=208465&view=diff
==============================================================================
--- libcxxabi/trunk/test/test_vector1.cpp (original)
+++ libcxxabi/trunk/test/test_vector1.cpp Fri May 9 19:40:54 2014
@@ -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
More information about the cfe-commits
mailing list