[libcxx-commits] [libcxxabi] 3a244fc - [libc++] Remove more test-suite workarounds for unsupported GCC versions
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Aug 20 10:26:52 PDT 2021
Author: Louis Dionne
Date: 2021-08-20T13:26:43-04:00
New Revision: 3a244fcf298838c9a9765c61d32a9bbcfd2c033a
URL: https://github.com/llvm/llvm-project/commit/3a244fcf298838c9a9765c61d32a9bbcfd2c033a
DIFF: https://github.com/llvm/llvm-project/commit/3a244fcf298838c9a9765c61d32a9bbcfd2c033a.diff
LOG: [libc++] Remove more test-suite workarounds for unsupported GCC versions
Differential Revision: https://reviews.llvm.org/D108466
Added:
Modified:
libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
libcxx/test/std/utilities/variant/variant.get/get_index.pass.cpp
libcxx/test/std/utilities/variant/variant.get/get_type.pass.cpp
libcxx/test/support/test_workarounds.h
libcxxabi/test/dynamic_cast.pass.cpp
libcxxabi/test/dynamic_cast3.pass.cpp
libcxxabi/test/dynamic_cast5.pass.cpp
libcxxabi/test/unwind_06.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
index e98df1ef96be..c1100916d90a 100644
--- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
@@ -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
diff --git a/libcxx/test/std/utilities/variant/variant.get/get_index.pass.cpp b/libcxx/test/std/utilities/variant/variant.get/get_index.pass.cpp
index bed0026ccc50..77d4d6cba79d 100644
--- a/libcxx/test/std/utilities/variant/variant.get/get_index.pass.cpp
+++ b/libcxx/test/std/utilities/variant/variant.get/get_index.pass.cpp
@@ -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, "");
}
diff --git a/libcxx/test/std/utilities/variant/variant.get/get_type.pass.cpp b/libcxx/test/std/utilities/variant/variant.get/get_type.pass.cpp
index e96269b4fadf..5eed39a3cfc3 100644
--- a/libcxx/test/std/utilities/variant/variant.get/get_type.pass.cpp
+++ b/libcxx/test/std/utilities/variant/variant.get/get_type.pass.cpp
@@ -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, "");
}
diff --git a/libcxx/test/support/test_workarounds.h b/libcxx/test/support/test_workarounds.h
index 8e1b44ff9854..4909421da5c7 100644
--- a/libcxx/test/support/test_workarounds.h
+++ b/libcxx/test/support/test_workarounds.h
@@ -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
diff --git a/libcxxabi/test/dynamic_cast.pass.cpp b/libcxxabi/test/dynamic_cast.pass.cpp
index 4df97c995ac1..886f9afced1f 100644
--- a/libcxxabi/test/dynamic_cast.pass.cpp
+++ b/libcxxabi/test/dynamic_cast.pass.cpp
@@ -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
diff --git a/libcxxabi/test/dynamic_cast3.pass.cpp b/libcxxabi/test/dynamic_cast3.pass.cpp
index 2eefafa2b42b..9c25cac865b9 100644
--- a/libcxxabi/test/dynamic_cast3.pass.cpp
+++ b/libcxxabi/test/dynamic_cast3.pass.cpp
@@ -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
diff --git a/libcxxabi/test/dynamic_cast5.pass.cpp b/libcxxabi/test/dynamic_cast5.pass.cpp
index 7fdf106aae5b..0a9689c23d6b 100644
--- a/libcxxabi/test/dynamic_cast5.pass.cpp
+++ b/libcxxabi/test/dynamic_cast5.pass.cpp
@@ -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
diff --git a/libcxxabi/test/unwind_06.pass.cpp b/libcxxabi/test/unwind_06.pass.cpp
index f8e9f8953aa9..0c34c4949376 100644
--- a/libcxxabi/test/unwind_06.pass.cpp
+++ b/libcxxabi/test/unwind_06.pass.cpp
@@ -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
More information about the libcxx-commits
mailing list