[libcxx-commits] [PATCH] D61033: [libc++][test] Fix noexcept assertions in variant's get tests
Casey Carter via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 23 13:46:42 PDT 2019
CaseyCarter updated this revision to Diff 196316.
CaseyCarter marked an inline comment as done.
CaseyCarter added a comment.
Update conditional: the bug was closed as a duplicate of a bug which has been fixed on master. Tag with the correct bug number, and disable the workaround for GCC 9.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61033/new/
https://reviews.llvm.org/D61033
Files:
test/std/utilities/variant/variant.get/get_index.pass.cpp
test/std/utilities/variant/variant.get/get_type.pass.cpp
Index: test/std/utilities/variant/variant.get/get_type.pass.cpp
===================================================================
--- test/std/utilities/variant/variant.get/get_type.pass.cpp
+++ test/std/utilities/variant/variant.get/get_type.pass.cpp
@@ -37,8 +37,8 @@
{
using V = std::variant<int, const long>;
constexpr V v(42);
-#ifndef __clang__ // Avoid https://bugs.llvm.org/show_bug.cgi?id=15481
- ASSERT_NOEXCEPT(std::get<int>(v));
+#if !defined(__GNUC__) || defined(__clang__) || __GNUC__ >= 9 // Avoid https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87603
+ ASSERT_NOT_NOEXCEPT(std::get<int>(v));
#endif
ASSERT_SAME_TYPE(decltype(std::get<0>(v)), const int &);
static_assert(std::get<int>(v) == 42, "");
@@ -53,8 +53,8 @@
{
using V = std::variant<int, const long>;
constexpr V v(42l);
-#ifndef __clang__ // Avoid https://bugs.llvm.org/show_bug.cgi?id=15481
- ASSERT_NOEXCEPT(std::get<const long>(v));
+#if !defined(__GNUC__) || defined(__clang__) || __GNUC__ >= 9 // Avoid https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87603
+ 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, "");
Index: test/std/utilities/variant/variant.get/get_index.pass.cpp
===================================================================
--- test/std/utilities/variant/variant.get/get_index.pass.cpp
+++ test/std/utilities/variant/variant.get/get_index.pass.cpp
@@ -43,8 +43,8 @@
{
using V = std::variant<int, const long>;
constexpr V v(42);
-#ifndef __clang__ // Avoid https://bugs.llvm.org/show_bug.cgi?id=15481
- ASSERT_NOEXCEPT(std::get<0>(v));
+#if !defined(__GNUC__) || defined(__clang__) || __GNUC__ >= 9 // Avoid https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87603
+ 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, "");
@@ -59,8 +59,8 @@
{
using V = std::variant<int, const long>;
constexpr V v(42l);
-#ifndef __clang__ // Avoid https://bugs.llvm.org/show_bug.cgi?id=15481
- ASSERT_NOEXCEPT(std::get<1>(v));
+#if !defined(__GNUC__) || defined(__clang__) || __GNUC__ >= 9 // Avoid https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87603
+ ASSERT_NOT_NOEXCEPT(std::get<0>(v));
#endif
ASSERT_SAME_TYPE(decltype(std::get<1>(v)), const long &);
static_assert(std::get<1>(v) == 42, "");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61033.196316.patch
Type: text/x-patch
Size: 2493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190423/65f095f9/attachment.bin>
More information about the libcxx-commits
mailing list