[all-commits] [llvm/llvm-project] 54e3fc: [libc++] Complete refactor of tests for operator new

Louis Dionne via All-commits all-commits at lists.llvm.org
Tue May 23 21:49:36 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 54e3fc3563b9eead46dd5f7ee3e06fec75b242a7
      https://github.com/llvm/llvm-project/commit/54e3fc3563b9eead46dd5f7ee3e06fec75b242a7
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2023-05-23 (Tue, 23 May 2023)

  Changed paths:
    M libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
    M libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.pass.cpp
    M libcxx/test/std/language.support/support.dynamic/align_val_t.pass.cpp
    M libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size.replace.indirect.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size.replace.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size_align.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size_align.replace.indirect.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size_align.replace.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size_align_nothrow.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size_align_nothrow.replace.indirect.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size_align_nothrow.replace.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size_nothrow.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size_nothrow.replace.indirect.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size_nothrow.replace.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_replace.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.verify.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.verify.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.verify.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.verify.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/nodiscard.verify.cpp
    M libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.size.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.size.replace.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.size_align.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.size_align.replace.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.size_align_nothrow.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.size_align_nothrow.replace.indirect.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.size_align_nothrow.replace.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.size_nothrow.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.size_nothrow.replace.indirect.pass.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.size_nothrow.replace.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_replace.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow_replace.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_replace.pass.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size.verify.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.verify.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.verify.cpp
    R libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_nothrow.verify.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/nodiscard.verify.cpp
    A libcxx/test/std/language.support/support.dynamic/new.delete/types.h
    M libcxx/test/support/test_macros.h

  Log Message:
  -----------
  [libc++] Complete refactor of tests for operator new

I stumbled upon the `operator new` and `operator new[]` tests while
investigating an issue with `operator new` when exceptions are disabled,
and I realized that our test coverage was incomplete. This patch refactors
all the `operator new` and `operator new[]` tests to add consistency and
better coverage for scenarios in which it should be possible to override
an operator indirectly by defining another one (for example new(size_t, nothrow)
should use new(size_t) if it has been provided).

This is intended to be a NFC setting up the terrain for some refactoring
work and bug fix in operator new.

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




More information about the All-commits mailing list