[libc-commits] [libc] [libc] Fix usage of std::nullptr_t in LibcTest.h. (PR #114321)

via libc-commits libc-commits at lists.llvm.org
Wed Oct 30 15:56:34 PDT 2024


https://github.com/lntue created https://github.com/llvm/llvm-project/pull/114321

None

>From 31cbf32d047ad08a11a6fe87cc649c090c310ce0 Mon Sep 17 00:00:00 2001
From: Tue Ly <lntue.h at gmail.com>
Date: Wed, 30 Oct 2024 22:53:35 +0000
Subject: [PATCH] [libc] Fix usage of std::nullptr_t in LibcTest.h.

---
 libc/test/UnitTest/LibcTest.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/test/UnitTest/LibcTest.h b/libc/test/UnitTest/LibcTest.h
index 1707c3c0fdcfad..b4e3819ea958de 100644
--- a/libc/test/UnitTest/LibcTest.h
+++ b/libc/test/UnitTest/LibcTest.h
@@ -165,7 +165,7 @@ class Test {
   // Helper to allow macro invocations like `ASSERT_EQ(foo, nullptr)`.
   template <typename ValType,
             cpp::enable_if_t<cpp::is_pointer_v<ValType>, ValType> = nullptr>
-  bool test(TestCond Cond, ValType LHS, std::nullptr_t, const char *LHSStr,
+  bool test(TestCond Cond, ValType LHS, cpp::nullptr_t, const char *LHSStr,
             const char *RHSStr, internal::Location Loc) {
     return test(Cond, LHS, static_cast<ValType>(nullptr), LHSStr, RHSStr, Loc);
   }



More information about the libc-commits mailing list