[libcxx-commits] [libcxx] [libcxx] Improve handling of DummyData blocks in libcxx tests (PR #88897)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 22 06:40:38 PDT 2024


================
@@ -51,7 +51,8 @@ int main(int, char**) {
     // Test with an overaligned type
     {
         new_called = delete_called = 0;
-        OverAligned* x = DoNotOptimize(new OverAligned[3]);
+        OverAligned* dummy_data_block = new OverAligned;
----------------
ldionne wrote:

This is still incorrect. This test is trying to test `operator new[]`, but you are not calling it anymore. You are calling the non-array version.

https://github.com/llvm/llvm-project/pull/88897


More information about the libcxx-commits mailing list