Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc++] Fix sized deallocation comments in tests #98173

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Jul 9, 2024

Clang 19 turned on sized deallocation by default, but older versions of Clang did support sized deallocation nonetheless. This updates a few comments and removes UNSUPPORTED annotations that shouldn't be needed in a test that passes -fsized-deallocation directly.

Clang 19 turned on sized deallocation *by default*, but older versions
of Clang did support sized deallocation nonetheless. This updates a
few comments and removes UNSUPPORTED annotations that shouldn't be
needed in a test that passes -fsized-deallocation directly.
@ldionne ldionne requested a review from mordante July 9, 2024 15:31
@ldionne ldionne requested a review from a team as a code owner July 9, 2024 15:31
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Jul 9, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Jul 9, 2024

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

Clang 19 turned on sized deallocation by default, but older versions of Clang did support sized deallocation nonetheless. This updates a few comments and removes UNSUPPORTED annotations that shouldn't be needed in a test that passes -fsized-deallocation directly.


Full diff: https://github.com/llvm/llvm-project/pull/98173.diff

3 Files Affected:

  • (modified) libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp (+1-4)
  • (modified) libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array14.pass.cpp (+1-1)
  • (modified) libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp (+2-2)
diff --git a/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp b/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
index ef04ccddf1835..37e3f8167051a 100644
--- a/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
+++ b/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// test libc++'s implementation of align_val_t, and the relevant new/delete
+// Test libc++'s implementation of align_val_t, and the relevant new/delete
 // overloads in all dialects when -faligned-allocation is present.
 
 // Libc++ when built for z/OS doesn't contain the aligned allocation functions,
@@ -21,9 +21,6 @@
 // GCC doesn't support the aligned-allocation flags.
 // XFAIL: gcc
 
-// These compiler versions do not have proper sized deallocation support.
-// UNSUPPORTED: clang-17, clang-18
-
 // RUN: %{build} -faligned-allocation -fsized-deallocation
 // RUN: %{run}
 // RUN: %{build} -faligned-allocation -fno-sized-deallocation -DNO_SIZE
diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array14.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array14.pass.cpp
index dc8254680310c..01467ca9911e1 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array14.pass.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array14.pass.cpp
@@ -8,7 +8,7 @@
 
 // test sized operator delete[] replacement.
 
-// These compiler versions do not have proper sized deallocation support.
+// These compiler versions don't enable sized deallocation by default.
 // UNSUPPORTED: clang-17, clang-18
 
 // UNSUPPORTED: sanitizer-new-delete, c++03, c++11
diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp
index a03fc9f3e8266..fd7f2dbabdacc 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-// test sized operator delete replacement.
+// Test sized operator delete replacement.
 
-// These compiler versions do not have proper sized deallocation support.
+// These compiler versions do not enable sized deallocation by default.
 // UNSUPPORTED: clang-17, clang-18
 
 // UNSUPPORTED: sanitizer-new-delete, c++03, c++11

Copy link
Member

@mordante mordante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM!

@ldionne ldionne merged commit ad01635 into llvm:main Jul 10, 2024
56 checks passed
@ldionne ldionne deleted the review/fix-sized-deallocation-comments branch July 10, 2024 13:53
aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
Clang 19 turned on sized deallocation *by default*, but older versions
of Clang did support sized deallocation nonetheless. This updates a few
comments and removes UNSUPPORTED annotations that shouldn't be needed in
a test that passes -fsized-deallocation directly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants