[libcxx-commits] [libcxx] [libc++][test] Do not test Clang bug in `is_constructible.pass.cpp` (PR #105964)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 26 07:08:26 PDT 2024


https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/105964

>From dd64b93430c85774b8505ba772dd753b8ebc5a87 Mon Sep 17 00:00:00 2001
From: "S. B. Tam" <cpplearner at outlook.com>
Date: Sun, 25 Aug 2024 09:26:31 +0800
Subject: [PATCH 1/2] [libc++][test] Do not test Clang bug in
 `is_constructible.pass.cpp`

---
 .../meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
index 578efb90f7f1ab..9f1bb50e76dc97 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
@@ -228,8 +228,8 @@ int main(int, char**)
     // But the rvalue to lvalue reference binding isn't allowed according to
     // [over.match.ref] despite Clang accepting it.
     test_is_constructible<int&, ExplicitTo<int&>>();
-#ifndef TEST_COMPILER_GCC
-    test_is_constructible<const int&, ExplicitTo<int&&>>();
+#ifndef __clang__
+    test_is_not_constructible<const int&, ExplicitTo<int&&>>();
 #endif
 
     static_assert(std::is_constructible<int&&, ExplicitTo<int&&>>::value, "");

>From 803712c89a3c25cec4890f6b1e4c3f776c414ade Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 26 Aug 2024 10:08:19 -0400
Subject: [PATCH 2/2] Update
 libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp

---
 .../meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
index 9f1bb50e76dc97..9a5efe7b5fe32f 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
@@ -228,7 +228,7 @@ int main(int, char**)
     // But the rvalue to lvalue reference binding isn't allowed according to
     // [over.match.ref] despite Clang accepting it.
     test_is_constructible<int&, ExplicitTo<int&>>();
-#ifndef __clang__
+#ifndef TEST_COMPILER_CLANG
     test_is_not_constructible<const int&, ExplicitTo<int&&>>();
 #endif
 



More information about the libcxx-commits mailing list