[libcxx-commits] [libcxxabi] [libcxx] [libc++] Fix noexcept behaviour of operator new helper functions (PR #74337)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Dec 4 17:40:03 PST 2023
================
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
----------------
ldionne wrote:
We have a bunch of tests located in e.g. `libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size.pass.cpp`. Those are testing the various version of `operator new` we have:
```c++
void* operator new(std::size_t);
void* operator new[](std::size_t);
void* operator new(std::size_t, std::align_val_t);
void* operator new[](std::size_t, std::align_val_t);
```
You'll see each overload has its own test file. Can you add one test for each such overload? Note that we also have `std::nothrow_t` overloads of `operator new` but I don't think it makes sense to test that the `new_handler` throws `bad_alloc` for those, since the only thing it would do is terminate.
https://github.com/llvm/llvm-project/pull/74337
More information about the libcxx-commits
mailing list