[libcxx-commits] [libcxx] [libc++] Pass -fsized-deallocation to the sized_delete tests on AppleClang (PR #229257)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Oct 5 15:52:25 PDT 2026
https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/229257
Unlike upstream Clang, which enables sized deallocation by default since Clang 19, AppleClang still defaults to -fno-sized-deallocation. Explicitly pass -fsized-deallocation in the tests that require it to avoid them breaking at every new release of AppleClang.
>From 80e783e2746caa9310025514c0d9fffb9097fa9c Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 5 Oct 2026 13:16:55 -0400
Subject: [PATCH] [libc++] Pass -fsized-deallocation to the sized_delete tests
on AppleClang
Unlike upstream Clang, which enables sized deallocation by default since
Clang 19, AppleClang still defaults to -fno-sized-deallocation. Explicitly
pass -fsized-deallocation in the tests that require it to avoid them
breaking at every new release of AppleClang.
---
.../new.delete/new.delete.array/sized_delete_array.pass.cpp | 2 +-
.../new.delete/new.delete.single/sized_delete.pass.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp
index 0e411f8adc0f2ac..321994f6b2b17c1 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp
@@ -11,7 +11,7 @@
// UNSUPPORTED: c++03, c++11
// These compiler versions and platforms don't enable sized deallocation by default.
-// ADDITIONAL_COMPILE_FLAGS(apple-clang-21): -fsized-deallocation
+// ADDITIONAL_COMPILE_FLAGS(apple-clang): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(target=x86_64-w64-windows-gnu): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(target=i686-w64-windows-gnu): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(target=aarch64-w64-windows-gnu): -fsized-deallocation
diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp
index ca0f612bf757880..8d5757402d59be9 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp
@@ -11,7 +11,7 @@
// UNSUPPORTED: c++03, c++11
// These compiler versions and platforms don't enable sized deallocation by default.
-// ADDITIONAL_COMPILE_FLAGS(apple-clang-21): -fsized-deallocation
+// ADDITIONAL_COMPILE_FLAGS(apple-clang): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(target=x86_64-w64-windows-gnu): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(target=i686-w64-windows-gnu): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(target=aarch64-w64-windows-gnu): -fsized-deallocation
More information about the libcxx-commits
mailing list