[libcxx-commits] [PATCH] D137127: [libc++abi] Use std::nullptr_t instead of declaring it manually

Ryan Prichard via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 1 16:28:32 PDT 2022


rprichard updated this revision to Diff 472443.
rprichard added a comment.

Remove extraneous comma.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137127/new/

https://reviews.llvm.org/D137127

Files:
  libcxxabi/test/catch_reference_nullptr.pass.cpp


Index: libcxxabi/test/catch_reference_nullptr.pass.cpp
===================================================================
--- libcxxabi/test/catch_reference_nullptr.pass.cpp
+++ libcxxabi/test/catch_reference_nullptr.pass.cpp
@@ -6,10 +6,11 @@
 //
 //===----------------------------------------------------------------------===//
 
-// UNSUPPORTED: c++03,
+// UNSUPPORTED: c++03
 // UNSUPPORTED: no-exceptions
 
 #include <cassert>
+#include <cstddef>
 #include <cstdlib>
 
 struct A {};
@@ -27,13 +28,11 @@
 
 int main(int, char**)
 {
-  using nullptr_t = decltype(nullptr);
-
   // A reference to nullptr_t can catch nullptr.
-  catch_nullptr_test<nullptr_t, true>();
-  catch_nullptr_test<const nullptr_t, true>();
-  catch_nullptr_test<volatile nullptr_t, true>();
-  catch_nullptr_test<const volatile nullptr_t, true>();
+  catch_nullptr_test<std::nullptr_t, true>();
+  catch_nullptr_test<const std::nullptr_t, true>();
+  catch_nullptr_test<volatile std::nullptr_t, true>();
+  catch_nullptr_test<const volatile std::nullptr_t, true>();
 
   // No other reference type can.
 #if 0


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137127.472443.patch
Type: text/x-patch
Size: 1089 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221101/5246c7fb/attachment-0001.bin>


More information about the libcxx-commits mailing list