diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:47:26 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:47:26 +0000 |
commit | 51072bd6bf79ef2bc6a922079bff57c31c1effbc (patch) | |
tree | 91a2effbc9e6f80bdbbf9eb70e06c51ad0867ea0 /test/std/language.support | |
parent | bb5e33f003797b67974a8893f7f2930fc51b8210 (diff) |
Notes
Diffstat (limited to 'test/std/language.support')
35 files changed, 84 insertions, 355 deletions
diff --git a/test/std/language.support/cstdint/cstdint.syn/cstdint.pass.cpp b/test/std/language.support/cstdint/cstdint.syn/cstdint.pass.cpp index 23cf8b66bcb1f..20ae6e6207532 100644 --- a/test/std/language.support/cstdint/cstdint.syn/cstdint.pass.cpp +++ b/test/std/language.support/cstdint/cstdint.syn/cstdint.pass.cpp @@ -172,8 +172,8 @@ int main() // INTN_MIN static_assert(INT8_MIN == -128, "INT8_MIN == -128"); static_assert(INT16_MIN == -32768, "INT16_MIN == -32768"); - static_assert(INT32_MIN == -2147483648U, "INT32_MIN == -2147483648"); - static_assert(INT64_MIN == -9223372036854775808ULL, "INT64_MIN == -9223372036854775808LL"); + static_assert(INT32_MIN == -2147483647 - 1, "INT32_MIN == -2147483648"); + static_assert(INT64_MIN == -9223372036854775807LL - 1, "INT64_MIN == -9223372036854775808LL"); // INTN_MAX static_assert(INT8_MAX == 127, "INT8_MAX == 127"); @@ -190,8 +190,8 @@ int main() // INT_FASTN_MIN static_assert(INT_FAST8_MIN <= -128, "INT_FAST8_MIN <= -128"); static_assert(INT_FAST16_MIN <= -32768, "INT_FAST16_MIN <= -32768"); - static_assert(INT_FAST32_MIN <= -2147483648U, "INT_FAST32_MIN <= -2147483648"); - static_assert(INT_FAST64_MIN <= -9223372036854775808ULL, "INT_FAST64_MIN <= -9223372036854775808LL"); + static_assert(INT_FAST32_MIN <= -2147483647 - 1, "INT_FAST32_MIN <= -2147483648"); + static_assert(INT_FAST64_MIN <= -9223372036854775807LL - 1, "INT_FAST64_MIN <= -9223372036854775808LL"); // INT_FASTN_MAX static_assert(INT_FAST8_MAX >= 127, "INT_FAST8_MAX >= 127"); diff --git a/test/std/language.support/cstdint/version.pass.cpp b/test/std/language.support/cstdint/version.pass.cpp deleted file mode 100644 index 4c9a43a62abc0..0000000000000 --- a/test/std/language.support/cstdint/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <cstdint> - -#include <cstdint> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/std/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp b/test/std/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp deleted file mode 100644 index 7de5033045566..0000000000000 --- a/test/std/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// test bad_array_length - -#include <new> -#include <type_traits> -#include <cassert> - -int main() -{ -#if __LIBCPP_STD_VER > 11 - static_assert((std::is_base_of<std::bad_alloc, std::bad_array_length>::value), - "std::is_base_of<std::bad_alloc, std::bad_array_length>::value"); - static_assert(std::is_polymorphic<std::bad_array_length>::value, - "std::is_polymorphic<std::bad_array_length>::value"); - std::bad_array_length b; - std::bad_array_length b2 = b; - b2 = b; - const char* w = b2.what(); - assert(w); -#endif -} diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp index 105c7a93f210b..5887bb0bdf30a 100644 --- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp +++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp @@ -11,6 +11,10 @@ // UNSUPPORTED: sanitizer-new-delete +// TODO Investigate why UBSAN prevents new from calling our replacement. +// XFAIL: ubsan + + #include <new> #include <cstddef> #include <cstdlib> @@ -22,7 +26,9 @@ int new_called = 0; void* operator new(std::size_t s) throw(std::bad_alloc) { ++new_called; - return std::malloc(s); + void* ret = std::malloc(s); + if (!ret) std::abort(); // placate MSVC's unchecked malloc warning + return ret; } void operator delete(void* p) throw() diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp index 92bd7b952dcbc..1e78ea8fe2673 100644 --- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp +++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp @@ -11,6 +11,10 @@ // UNSUPPORTED: sanitizer-new-delete +// TODO Investigate why UBSAN prevents new from calling our replacement. +// XFAIL: ubsan + + #include <new> #include <cstddef> #include <cstdlib> @@ -22,7 +26,9 @@ volatile int new_called = 0; void* operator new(std::size_t s) throw(std::bad_alloc) { ++new_called; - return std::malloc(s); + void* ret = std::malloc(s); + if (!ret) std::abort(); // placate MSVC's unchecked malloc warning + return ret; } void operator delete(void* p) throw() diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array.pass.cpp index 1ab52ae4c8dfb..462d1973c5071 100644 --- a/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array.pass.cpp +++ b/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array.pass.cpp @@ -22,9 +22,13 @@ struct A int main() { - char buf[3*sizeof(A)]; + const std::size_t Size = 3; + // placement new might require additional space. + const std::size_t ExtraSize = 64; + char buf[Size*sizeof(A) + ExtraSize]; - A* ap = new(buf) A[3]; - assert((char*)ap == buf); - assert(A_constructed == 3); + A* ap = new(buf) A[Size]; + assert((char*)ap >= buf); + assert((char*)ap < (buf + ExtraSize)); + assert(A_constructed == Size); } diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp index 57ce287522081..892842a1b9f40 100644 --- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp +++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// // XFAIL: libcpp-no-exceptions + // test operator new // asan and msan will not call the new handler. diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow_replace.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow_replace.pass.cpp index cd70f90948d2d..eb8319bac2f72 100644 --- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow_replace.pass.cpp +++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow_replace.pass.cpp @@ -11,6 +11,9 @@ // UNSUPPORTED: sanitizer-new-delete +// TODO Investigate why UBSAN prevents nothrow new from calling our replacement. +// XFAIL: ubsan + #include <new> #include <cstddef> #include <cstdlib> @@ -22,7 +25,9 @@ int new_called = 0; void* operator new(std::size_t s) throw(std::bad_alloc) { ++new_called; - return std::malloc(s); + void* ret = std::malloc(s); + if (!ret) std::abort(); // placate MSVC's unchecked malloc warning + return ret; } void operator delete(void* p) throw() diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_replace.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_replace.pass.cpp index 0df3a93703d21..6056ed7bb0b39 100644 --- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_replace.pass.cpp +++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_replace.pass.cpp @@ -22,7 +22,9 @@ int new_called = 0; void* operator new(std::size_t s) throw(std::bad_alloc) { ++new_called; - return std::malloc(s); + void* ret = std::malloc(s); + if (!ret) std::abort(); // placate MSVC's unchecked malloc warning + return ret; } void operator delete(void* p) throw() diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_calls_unsized_delete.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_calls_unsized_delete.pass.cpp index 5c4eba53d3e4d..f656d1cd712a4 100644 --- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_calls_unsized_delete.pass.cpp +++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_calls_unsized_delete.pass.cpp @@ -13,6 +13,10 @@ // UNSUPPORTED: sanitizer-new-delete +// TODO Investigate why UBSAN prevents new from calling our replacement. +// XFAIL: ubsan + + #include <new> #include <cstddef> #include <cstdlib> diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp index da43d49691742..24d33e210f573 100644 --- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp +++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp @@ -14,6 +14,9 @@ // UNSUPPORTED: sanitizer-new-delete +// TODO Investigate why UBSAN prevents new from calling our replacement. +// XFAIL: ubsan + // NOTE: Only clang-3.7 and GCC 5.1 and greater support -fsized-deallocation. // REQUIRES: fsized-deallocation diff --git a/test/std/language.support/support.dynamic/version.pass.cpp b/test/std/language.support/support.dynamic/version.pass.cpp deleted file mode 100644 index ba1ff518e51f0..0000000000000 --- a/test/std/language.support/support.dynamic/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <new> - -#include <new> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp b/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp index a8b6e15feab88..4ee95fdf30016 100644 --- a/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp +++ b/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp @@ -76,9 +76,9 @@ int main() std::rethrow_if_nested(a); assert(false); } - catch (const B& b) + catch (const B& b2) { - assert(b == B(5)); + assert(b2 == B(5)); } } } diff --git a/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp b/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp index 98006bb1e3a0f..c14cb69bdea3d 100644 --- a/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp +++ b/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp @@ -18,6 +18,8 @@ #include <cstdlib> #include <cassert> +#include "test_macros.h" + class A { int data_; @@ -37,7 +39,7 @@ public: friend bool operator==(const B& x, const B& y) {return x.data_ == y.data_;} }; -#if __cplusplus > 201103L +#if TEST_STD_VER > 11 struct Final final {}; #endif @@ -105,14 +107,14 @@ int main() assert(i == 7); } } -#if __cplusplus > 201103L +#if TEST_STD_VER > 11 { try { std::throw_with_nested(Final()); assert(false); } - catch (const Final &f) + catch (const Final &) { } } diff --git a/test/std/language.support/support.exception/propagation/current_exception.pass.cpp b/test/std/language.support/support.exception/propagation/current_exception.pass.cpp index 09adf580bddf8..7bf1df457dbed 100644 --- a/test/std/language.support/support.exception/propagation/current_exception.pass.cpp +++ b/test/std/language.support/support.exception/propagation/current_exception.pass.cpp @@ -74,7 +74,7 @@ int main() throw A(); assert(false); } - catch (A& a) + catch (A&) { std::exception_ptr p = std::current_exception(); assert(A::constructed == 1); @@ -94,7 +94,7 @@ int main() throw A(); assert(false); } - catch (A a) + catch (A) { std::exception_ptr p = std::current_exception(); assert(A::constructed == 2); diff --git a/test/std/language.support/support.exception/version.pass.cpp b/test/std/language.support/support.exception/version.pass.cpp deleted file mode 100644 index acdedbb31fe32..0000000000000 --- a/test/std/language.support/support.exception/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <exception> - -#include <exception> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/std/language.support/support.initlist/version.pass.cpp b/test/std/language.support/support.initlist/version.pass.cpp deleted file mode 100644 index f3f08cd1f864e..0000000000000 --- a/test/std/language.support/support.initlist/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <initializer_list> - -#include <initializer_list> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/std/language.support/support.limits/c.limits/version_cfloat.pass.cpp b/test/std/language.support/support.limits/c.limits/version_cfloat.pass.cpp deleted file mode 100644 index 19b463199cd61..0000000000000 --- a/test/std/language.support/support.limits/c.limits/version_cfloat.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <cfloat> - -#include <cfloat> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/std/language.support/support.limits/c.limits/version_climits.pass.cpp b/test/std/language.support/support.limits/c.limits/version_climits.pass.cpp deleted file mode 100644 index 3fe07a5174b30..0000000000000 --- a/test/std/language.support/support.limits/c.limits/version_climits.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <climits> - -#include <climits> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp index bbead15da64f3..50cfc46742514 100644 --- a/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp +++ b/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp @@ -178,13 +178,13 @@ int main() TEST_NUMERIC_LIMITS(const float) TEST_NUMERIC_LIMITS(volatile float) TEST_NUMERIC_LIMITS(const volatile float) - + // double TEST_NUMERIC_LIMITS(double) TEST_NUMERIC_LIMITS(const double) TEST_NUMERIC_LIMITS(volatile double) TEST_NUMERIC_LIMITS(const volatile double) - + // long double TEST_NUMERIC_LIMITS(long double) TEST_NUMERIC_LIMITS(const long double) diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp index a452d4e9949d4..8deb28d3fd9c8 100644 --- a/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp +++ b/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp @@ -12,6 +12,7 @@ // denorm_min() #include <limits> +#include <cfloat> #include <cassert> template <class T> @@ -47,7 +48,17 @@ int main() test<__int128_t>(0); test<__uint128_t>(0); #endif +#if defined(__FLT_DENORM_MIN__) // guarded because these macros are extensions. test<float>(__FLT_DENORM_MIN__); test<double>(__DBL_DENORM_MIN__); test<long double>(__LDBL_DENORM_MIN__); +#endif +#if defined(FLT_TRUE_MIN) // not currently provided on linux. + test<float>(FLT_TRUE_MIN); + test<double>(DBL_TRUE_MIN); + test<long double>(LDBL_TRUE_MIN); +#endif +#if !defined(__FLT_DENORM_MIN__) && !defined(FLT_TRUE_MIN) +#error Test has no expected values for floating point types +#endif } diff --git a/test/std/language.support/support.limits/limits/version.pass.cpp b/test/std/language.support/support.limits/limits/version.pass.cpp deleted file mode 100644 index 0cb3f6f52a4e6..0000000000000 --- a/test/std/language.support/support.limits/limits/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <limits> - -#include <limits> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/std/language.support/support.rtti/version.pass.cpp b/test/std/language.support/support.rtti/version.pass.cpp deleted file mode 100644 index 0a9ece34f97ea..0000000000000 --- a/test/std/language.support/support.rtti/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <typeinfo> - -#include <typeinfo> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/std/language.support/support.runtime/csetjmp.pass.cpp b/test/std/language.support/support.runtime/csetjmp.pass.cpp index dc034ce099e2e..f5060305608d3 100644 --- a/test/std/language.support/support.runtime/csetjmp.pass.cpp +++ b/test/std/language.support/support.runtime/csetjmp.pass.cpp @@ -19,6 +19,7 @@ int main() { std::jmp_buf jb; + ((void)jb); // Prevent unused warning static_assert((std::is_same<decltype(std::longjmp(jb, 0)), void>::value), "std::is_same<decltype(std::longjmp(jb, 0)), void>::value"); } diff --git a/test/std/language.support/support.runtime/cstdarg.pass.cpp b/test/std/language.support/support.runtime/cstdarg.pass.cpp index 9d6f610a943ef..e7282b1c555e8 100644 --- a/test/std/language.support/support.runtime/cstdarg.pass.cpp +++ b/test/std/language.support/support.runtime/cstdarg.pass.cpp @@ -11,11 +11,13 @@ #include <cstdarg> +#include "test_macros.h" + #ifndef va_arg #error va_arg not defined #endif -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 # ifndef va_copy # error va_copy is not defined when c++ >= 11 # endif diff --git a/test/std/language.support/support.runtime/ctime.pass.cpp b/test/std/language.support/support.runtime/ctime.pass.cpp index 03a0aa4d69666..34343b247f215 100644 --- a/test/std/language.support/support.runtime/ctime.pass.cpp +++ b/test/std/language.support/support.runtime/ctime.pass.cpp @@ -23,10 +23,13 @@ int main() { std::clock_t c = 0; - ((void)c); std::size_t s = 0; std::time_t t = 0; - std::tm tm = {0}; + std::tm tm = {}; + ((void)c); // Prevent unused warning + ((void)s); // Prevent unused warning + ((void)t); // Prevent unused warning + ((void)tm); // Prevent unused warning static_assert((std::is_same<decltype(std::clock()), std::clock_t>::value), ""); static_assert((std::is_same<decltype(std::difftime(t,t)), double>::value), ""); static_assert((std::is_same<decltype(std::mktime(&tm)), std::time_t>::value), ""); @@ -39,5 +42,7 @@ int main() #endif char* c1 = 0; const char* c2 = 0; + ((void)c1); // Prevent unused warning + ((void)c2); // Prevent unused warning static_assert((std::is_same<decltype(std::strftime(c1,s,c2,&tm)), std::size_t>::value), ""); } diff --git a/test/std/language.support/support.runtime/version_csetjmp.pass.cpp b/test/std/language.support/support.runtime/version_csetjmp.pass.cpp deleted file mode 100644 index 7e37716d01459..0000000000000 --- a/test/std/language.support/support.runtime/version_csetjmp.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <csetjmp> - -#include <csetjmp> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/std/language.support/support.runtime/version_csignal.pass.cpp b/test/std/language.support/support.runtime/version_csignal.pass.cpp deleted file mode 100644 index be1045f1eb3b1..0000000000000 --- a/test/std/language.support/support.runtime/version_csignal.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <csignal> - -#include <csignal> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/std/language.support/support.runtime/version_cstdarg.pass.cpp b/test/std/language.support/support.runtime/version_cstdarg.pass.cpp deleted file mode 100644 index f3ca9389b15d2..0000000000000 --- a/test/std/language.support/support.runtime/version_cstdarg.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <cstdarg> - -#include <cstdarg> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/std/language.support/support.runtime/version_cstdbool.pass.cpp b/test/std/language.support/support.runtime/version_cstdbool.pass.cpp deleted file mode 100644 index 0415227e58ead..0000000000000 --- a/test/std/language.support/support.runtime/version_cstdbool.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <cstdbool> - -#include <cstdbool> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/std/language.support/support.runtime/version_cstdlib.pass.cpp b/test/std/language.support/support.runtime/version_cstdlib.pass.cpp deleted file mode 100644 index db419524f5783..0000000000000 --- a/test/std/language.support/support.runtime/version_cstdlib.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <cstdlib> - -#include <cstdlib> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/std/language.support/support.runtime/version_ctime.pass.cpp b/test/std/language.support/support.runtime/version_ctime.pass.cpp deleted file mode 100644 index ce0bf2cf1853c..0000000000000 --- a/test/std/language.support/support.runtime/version_ctime.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <ctime> - -#include <ctime> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/std/language.support/support.types/nullptr_t.pass.cpp b/test/std/language.support/support.types/nullptr_t.pass.cpp index 1cc2aa62032eb..ca5170f649ed9 100644 --- a/test/std/language.support/support.types/nullptr_t.pass.cpp +++ b/test/std/language.support/support.types/nullptr_t.pass.cpp @@ -57,10 +57,14 @@ void test_comparisons() #pragma clang diagnostic ignored "-Wnull-conversion" #endif void test_nullptr_conversions() { +// GCC does not accept this due to CWG Defect #1423 +// http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1423 +#if defined(__clang__) { bool b = nullptr; assert(!b); } +#endif { bool b(nullptr); assert(!b); diff --git a/test/std/language.support/support.types/offsetof.pass.cpp b/test/std/language.support/support.types/offsetof.pass.cpp index e36ac22974ff7..d479f9ca44fa4 100644 --- a/test/std/language.support/support.types/offsetof.pass.cpp +++ b/test/std/language.support/support.types/offsetof.pass.cpp @@ -7,8 +7,12 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + #include <cstddef> +#include "test_macros.h" + #ifndef offsetof #error offsetof not defined #endif @@ -20,7 +24,5 @@ struct A int main() { -#if (__has_feature(cxx_noexcept)) static_assert(noexcept(offsetof(A, x)), ""); -#endif } diff --git a/test/std/language.support/support.types/version.pass.cpp b/test/std/language.support/support.types/version.pass.cpp deleted file mode 100644 index 2ab7c188de1d8..0000000000000 --- a/test/std/language.support/support.types/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <cstddef> - -#include <cstddef> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} |