[all-commits] [llvm/llvm-project] 292533: [libc++abi] Use std::nullptr_t instead of declarin...

Ryan Prichard via All-commits all-commits at lists.llvm.org
Fri Nov 4 15:52:18 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 292533324cadf0164a7e1d532508cb59775e0a72
      https://github.com/llvm/llvm-project/commit/292533324cadf0164a7e1d532508cb59775e0a72
  Author: Ryan Prichard <rprichard at google.com>
  Date:   2022-11-04 (Fri, 04 Nov 2022)

  Changed paths:
    M libcxxabi/test/catch_reference_nullptr.pass.cpp

  Log Message:
  -----------
  [libc++abi] Use std::nullptr_t instead of declaring it manually

Sometimes libc++'s stddef.h wrapper gets included, which defines
::nullptr_t. This test is compiled with -Wshadow -Werror, so shadowing
::nullptr_t with a nullptr_t in main is an error. Include cstddef,
which is guaranteed to define std::nullptr_t in C++11 and forward.

Reviewed By: ldionne, #libc_abi

Differential Revision: https://reviews.llvm.org/D137127




More information about the All-commits mailing list