forked from OSchip/llvm-project
[libc++] Remove more test-suite workarounds for unsupported GCC versions
Differential Revision: https://reviews.llvm.org/D108466
This commit is contained in:
parent
4bef7a8ff1
commit
3a244fcf29
|
@ -23,7 +23,7 @@
|
|||
|
||||
// Ignore warnings about volatile in parameters being deprecated.
|
||||
// We know it is, but we still have to test it.
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 10) && !defined(__clang__)
|
||||
#if defined(TEST_COMPILER_GCC)
|
||||
# pragma GCC diagnostic ignored "-Wvolatile"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -39,11 +39,7 @@ void test_const_lvalue_get() {
|
|||
{
|
||||
using V = std::variant<int, const long>;
|
||||
constexpr V v(42);
|
||||
#ifdef TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT
|
||||
ASSERT_NOEXCEPT(std::get<0>(v));
|
||||
#else
|
||||
ASSERT_NOT_NOEXCEPT(std::get<0>(v));
|
||||
#endif
|
||||
ASSERT_SAME_TYPE(decltype(std::get<0>(v)), const int &);
|
||||
static_assert(std::get<0>(v) == 42, "");
|
||||
}
|
||||
|
@ -57,11 +53,7 @@ void test_const_lvalue_get() {
|
|||
{
|
||||
using V = std::variant<int, const long>;
|
||||
constexpr V v(42l);
|
||||
#ifdef TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT
|
||||
ASSERT_NOEXCEPT(std::get<1>(v));
|
||||
#else
|
||||
ASSERT_NOT_NOEXCEPT(std::get<1>(v));
|
||||
#endif
|
||||
ASSERT_SAME_TYPE(decltype(std::get<1>(v)), const long &);
|
||||
static_assert(std::get<1>(v) == 42, "");
|
||||
}
|
||||
|
|
|
@ -33,11 +33,7 @@ void test_const_lvalue_get() {
|
|||
{
|
||||
using V = std::variant<int, const long>;
|
||||
constexpr V v(42);
|
||||
#ifdef TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT
|
||||
ASSERT_NOEXCEPT(std::get<int>(v));
|
||||
#else
|
||||
ASSERT_NOT_NOEXCEPT(std::get<int>(v));
|
||||
#endif
|
||||
ASSERT_SAME_TYPE(decltype(std::get<int>(v)), const int &);
|
||||
static_assert(std::get<int>(v) == 42, "");
|
||||
}
|
||||
|
@ -51,11 +47,7 @@ void test_const_lvalue_get() {
|
|||
{
|
||||
using V = std::variant<int, const long>;
|
||||
constexpr V v(42l);
|
||||
#ifdef TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT
|
||||
ASSERT_NOEXCEPT(std::get<const long>(v));
|
||||
#else
|
||||
ASSERT_NOT_NOEXCEPT(std::get<const long>(v));
|
||||
#endif
|
||||
ASSERT_SAME_TYPE(decltype(std::get<const long>(v)), const long &);
|
||||
static_assert(std::get<const long>(v) == 42, "");
|
||||
}
|
||||
|
|
|
@ -25,10 +25,4 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(TEST_COMPILER_GCC)
|
||||
# if __GNUC__ < 9
|
||||
# define TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT // GCC-87603
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif // SUPPORT_TEST_WORKAROUNDS_H
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
// bases.
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic ignored "-Winaccessible-base"
|
||||
#elif defined(__GNUC__) && (__GNUC__ >= 10)
|
||||
#elif defined(__GNUC__)
|
||||
# pragma GCC diagnostic ignored "-Winaccessible-base"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// bases.
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic ignored "-Winaccessible-base"
|
||||
#elif defined(__GNUC__) && (__GNUC__ >= 10)
|
||||
#elif defined(__GNUC__)
|
||||
# pragma GCC diagnostic ignored "-Winaccessible-base"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// bases.
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic ignored "-Winaccessible-base"
|
||||
#elif defined(__GNUC__) && (__GNUC__ >= 10)
|
||||
#elif defined(__GNUC__)
|
||||
# pragma GCC diagnostic ignored "-Winaccessible-base"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <stdio.h>
|
||||
|
||||
// Suppress diagnostics about deprecated volatile operations
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 10) && !defined(__clang__)
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
# pragma GCC diagnostic ignored "-Wvolatile"
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue