diff options
author | Eric Fiselier <eric@efcs.ca> | 2015-08-20 01:22:17 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2015-08-20 01:22:17 +0000 |
commit | c79a8f7753d1606f672d612876c7b4b065aab8d3 (patch) | |
tree | f9d32b8c8ac98a3a46f40ef278b95be41593d064 | |
parent | be78c25acb42c1a5665c45ab6005492625723777 (diff) | |
download | bcm5719-llvm-c79a8f7753d1606f672d612876c7b4b065aab8d3.tar.gz bcm5719-llvm-c79a8f7753d1606f672d612876c7b4b065aab8d3.zip |
Fix or disable C++11 tests in C++03 mode
llvm-svn: 245531
-rw-r--r-- | libcxxabi/test/catch_in_noexcept.pass.cpp | 2 | ||||
-rw-r--r-- | libcxxabi/test/catch_pointer_nullptr.pass.cpp | 24 | ||||
-rw-r--r-- | libcxxabi/test/catch_ptr_02.pass.cpp | 8 | ||||
-rw-r--r-- | libcxxabi/test/dynamic_cast_stress.pass.cpp | 2 |
4 files changed, 14 insertions, 22 deletions
diff --git a/libcxxabi/test/catch_in_noexcept.pass.cpp b/libcxxabi/test/catch_in_noexcept.pass.cpp index 02fecda495d..7e48ed2507a 100644 --- a/libcxxabi/test/catch_in_noexcept.pass.cpp +++ b/libcxxabi/test/catch_in_noexcept.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + #include <exception> #include <stdlib.h> #include <assert.h> diff --git a/libcxxabi/test/catch_pointer_nullptr.pass.cpp b/libcxxabi/test/catch_pointer_nullptr.pass.cpp index b969119b0d8..7caee7b3aa0 100644 --- a/libcxxabi/test/catch_pointer_nullptr.pass.cpp +++ b/libcxxabi/test/catch_pointer_nullptr.pass.cpp @@ -7,17 +7,13 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + #include <cassert> #include <cstdlib> -#ifndef __has_feature -#define __has_feature(x) 0 -#endif - struct A {}; -#if __has_feature(cxx_nullptr) - void test1() { try @@ -62,22 +58,6 @@ void catch_nullptr_test() { } } -#else - -void test1() -{ -} - -void test2() -{ -} - -template <class Catch> -void catch_nullptr_test() -{ -} - -#endif int main() { diff --git a/libcxxabi/test/catch_ptr_02.pass.cpp b/libcxxabi/test/catch_ptr_02.pass.cpp index 34af3c80469..c3c4400b45d 100644 --- a/libcxxabi/test/catch_ptr_02.pass.cpp +++ b/libcxxabi/test/catch_ptr_02.pass.cpp @@ -9,6 +9,10 @@ #include <cassert> +#if __cplusplus < 201103L +#define DISABLE_NULLPTR_TESTS +#endif + struct A {}; A a; const A ca = A(); @@ -99,6 +103,7 @@ void test5 () void test6 () { +#if !defined(DISABLE_NULLPTR_TESTS) try { throw nullptr; @@ -111,6 +116,7 @@ void test6 () { assert (false); } +#endif } void test7 () @@ -152,6 +158,7 @@ void test8 () void test9 () { +#if !defined(DISABLE_NULLPTR_TESTS) try { throw nullptr; @@ -164,6 +171,7 @@ void test9 () { assert (false); } +#endif } void test10 () diff --git a/libcxxabi/test/dynamic_cast_stress.pass.cpp b/libcxxabi/test/dynamic_cast_stress.pass.cpp index 95276b221e4..133670a3f12 100644 --- a/libcxxabi/test/dynamic_cast_stress.pass.cpp +++ b/libcxxabi/test/dynamic_cast_stress.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + #include <cassert> #include <tuple> #include "support/timer.hpp" |