[all-commits] [llvm/llvm-project] 2b89c3: [libcxx] Adjust trivial_abi tests for C++03 and C+...

Mikhail Maltsev via All-commits all-commits at lists.llvm.org
Thu Jul 23 06:21:38 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b89c34784fa52b2948d79f31a375011c0218804
      https://github.com/llvm/llvm-project/commit/2b89c34784fa52b2948d79f31a375011c0218804
  Author: Mikhail Maltsev <mikhail.maltsev at arm.com>
  Date:   2020-07-23 (Thu, 23 Jul 2020)

  Changed paths:
    M libcxx/test/libcxx/memory/trivial_abi/shared_ptr_arg.pass.cpp
    M libcxx/test/libcxx/memory/trivial_abi/unique_ptr_arg.pass.cpp
    M libcxx/test/libcxx/memory/trivial_abi/unique_ptr_array.pass.cpp
    M libcxx/test/libcxx/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp
    M libcxx/test/libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp

  Log Message:
  -----------
  [libcxx] Adjust trivial_abi tests for C++03 and C++11 testing

This change replaces std::make_unique with manual construction of
std::unique_ptr to make the tests compatible with C++11
(std::make_unique is a C++14 feature).

libc++ supports std::unique_ptr and std::shared_ptr even in C++03 but
with some limitations: unique_ptr_array.pass.cpp and
shared_ptr_arg.pass.cpp fail to compile in C++03 mode and need to be
disabled.

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




More information about the All-commits mailing list