Skip to content

Commit 3a244fc

Browse files
committed
[libc++] Remove more test-suite workarounds for unsupported GCC versions
Differential Revision: https://reviews.llvm.org/D108466
1 parent 4bef7a8 commit 3a244fc

File tree

8 files changed

+5
-27
lines changed

8 files changed

+5
-27
lines changed

libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
// Ignore warnings about volatile in parameters being deprecated.
2525
// We know it is, but we still have to test it.
26-
#if defined(__GNUC__) && (__GNUC__ >= 10) && !defined(__clang__)
26+
#if defined(TEST_COMPILER_GCC)
2727
# pragma GCC diagnostic ignored "-Wvolatile"
2828
#endif
2929

libcxx/test/std/utilities/variant/variant.get/get_index.pass.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,7 @@ void test_const_lvalue_get() {
3939
{
4040
using V = std::variant<int, const long>;
4141
constexpr V v(42);
42-
#ifdef TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT
43-
ASSERT_NOEXCEPT(std::get<0>(v));
44-
#else
4542
ASSERT_NOT_NOEXCEPT(std::get<0>(v));
46-
#endif
4743
ASSERT_SAME_TYPE(decltype(std::get<0>(v)), const int &);
4844
static_assert(std::get<0>(v) == 42, "");
4945
}
@@ -57,11 +53,7 @@ void test_const_lvalue_get() {
5753
{
5854
using V = std::variant<int, const long>;
5955
constexpr V v(42l);
60-
#ifdef TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT
61-
ASSERT_NOEXCEPT(std::get<1>(v));
62-
#else
6356
ASSERT_NOT_NOEXCEPT(std::get<1>(v));
64-
#endif
6557
ASSERT_SAME_TYPE(decltype(std::get<1>(v)), const long &);
6658
static_assert(std::get<1>(v) == 42, "");
6759
}

libcxx/test/std/utilities/variant/variant.get/get_type.pass.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ void test_const_lvalue_get() {
3333
{
3434
using V = std::variant<int, const long>;
3535
constexpr V v(42);
36-
#ifdef TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT
37-
ASSERT_NOEXCEPT(std::get<int>(v));
38-
#else
3936
ASSERT_NOT_NOEXCEPT(std::get<int>(v));
40-
#endif
4137
ASSERT_SAME_TYPE(decltype(std::get<int>(v)), const int &);
4238
static_assert(std::get<int>(v) == 42, "");
4339
}
@@ -51,11 +47,7 @@ void test_const_lvalue_get() {
5147
{
5248
using V = std::variant<int, const long>;
5349
constexpr V v(42l);
54-
#ifdef TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT
55-
ASSERT_NOEXCEPT(std::get<const long>(v));
56-
#else
5750
ASSERT_NOT_NOEXCEPT(std::get<const long>(v));
58-
#endif
5951
ASSERT_SAME_TYPE(decltype(std::get<const long>(v)), const long &);
6052
static_assert(std::get<const long>(v) == 42, "");
6153
}

libcxx/test/support/test_workarounds.h

-6
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,4 @@
2525
# endif
2626
#endif
2727

28-
#if defined(TEST_COMPILER_GCC)
29-
# if __GNUC__ < 9
30-
# define TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT // GCC-87603
31-
# endif
32-
#endif
33-
3428
#endif // SUPPORT_TEST_WORKAROUNDS_H

libcxxabi/test/dynamic_cast.pass.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// bases.
1919
#if defined(__clang__)
2020
# pragma clang diagnostic ignored "-Winaccessible-base"
21-
#elif defined(__GNUC__) && (__GNUC__ >= 10)
21+
#elif defined(__GNUC__)
2222
# pragma GCC diagnostic ignored "-Winaccessible-base"
2323
#endif
2424

libcxxabi/test/dynamic_cast3.pass.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// bases.
1414
#if defined(__clang__)
1515
# pragma clang diagnostic ignored "-Winaccessible-base"
16-
#elif defined(__GNUC__) && (__GNUC__ >= 10)
16+
#elif defined(__GNUC__)
1717
# pragma GCC diagnostic ignored "-Winaccessible-base"
1818
#endif
1919

libcxxabi/test/dynamic_cast5.pass.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// bases.
1414
#if defined(__clang__)
1515
# pragma clang diagnostic ignored "-Winaccessible-base"
16-
#elif defined(__GNUC__) && (__GNUC__ >= 10)
16+
#elif defined(__GNUC__)
1717
# pragma GCC diagnostic ignored "-Winaccessible-base"
1818
#endif
1919

libcxxabi/test/unwind_06.pass.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <stdio.h>
1515

1616
// Suppress diagnostics about deprecated volatile operations
17-
#if defined(__GNUC__) && (__GNUC__ >= 10) && !defined(__clang__)
17+
#if defined(__GNUC__) && !defined(__clang__)
1818
# pragma GCC diagnostic ignored "-Wvolatile"
1919
#endif
2020

0 commit comments

Comments
 (0)