[libcxx-commits] [libcxx] [libcxx] Improve libcxx tests when using Optimizations. (PR #88897)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 25 07:31:44 PDT 2024
================
@@ -47,7 +47,7 @@ int main(int, char**) {
// Test with an overaligned type
{
new_nothrow_called = delete_called = 0;
- OverAligned* x = new (std::nothrow) OverAligned;
+ OverAligned* x = DoNotOptimize(new (std::nothrow) OverAligned);
----------------
ldionne wrote:
Ah! I understand this part of the change -- that looks like an oversight to me. However, I don't understand why you need to add a rvalue-reference overload to the function below, it seems to me that the `const&` overload should handle this correctly, no?
https://github.com/llvm/llvm-project/pull/88897
More information about the libcxx-commits
mailing list