[llvm-branch-commits] [libcxx] [libc++][C++03] Fix tests which only fail due to incorrect includes (PR #144110)

2025-08-26 Thread Nikolas Klauser via llvm-branch-commits

https://github.com/philnik777 updated 
https://github.com/llvm/llvm-project/pull/144110

>From 40bae50f12fd486508e388c8445f78558ea73086 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser 
Date: Fri, 13 Jun 2025 18:14:22 +0200
Subject: [PATCH] [libc++][C++03] Fix tests which only fail due to incorrect
 includes

---
 .../libcxx/depr/depr.c.headers/extern_c.pass.cpp   |  4 +---
 .../test/libcxx-03/algorithms/half_positive.pass.cpp   |  4 +---
 .../assertions/default_verbose_abort.pass.cpp  |  4 +---
 libcxx/test/libcxx-03/assertions/modes/none.pass.cpp   |  4 +---
 .../libcxx-03/assertions/single_expression.pass.cpp|  4 +---
 .../associative/tree_balance_after_insert.pass.cpp |  4 +---
 .../associative/tree_key_value_traits.pass.cpp |  4 +---
 .../containers/associative/tree_left_rotate.pass.cpp   |  4 +---
 .../containers/associative/tree_remove.pass.cpp|  4 +---
 .../containers/associative/tree_right_rotate.pass.cpp  |  4 +---
 .../containers/unord/key_value_traits.pass.cpp |  4 +---
 .../libcxx-03/containers/unord/next_prime.pass.cpp |  4 +---
 .../libcxx-03/iterators/aliasing_iterator.pass.cpp |  4 +---
 .../iterators/bounded_iter/arithmetic.pass.cpp |  4 +---
 .../iterators/bounded_iter/pointer_traits.pass.cpp |  4 +---
 .../iterators/bounded_iter/types.compile.pass.cpp  |  4 +---
 libcxx/test/libcxx-03/memory/allocation_guard.pass.cpp |  4 +---
 libcxx/test/libcxx-03/memory/swap_allocator.pass.cpp   |  4 +---
 .../test/libcxx-03/numerics/clamp_to_integral.pass.cpp |  4 +---
 .../strings/c.strings/constexpr_memmove.pass.cpp   |  4 +---
 .../is_trivially_comparable.compile.pass.cpp   |  8 +++-
 .../is_trivially_relocatable.compile.pass.cpp  |  4 +---
 .../libcxx-03/utilities/exception_guard.odr.sh.cpp |  4 +---
 .../libcxx-03/utilities/is_pointer_in_range.pass.cpp   |  4 +---
 .../test/libcxx-03/utilities/is_valid_range.pass.cpp   |  4 +---
 .../test/libcxx-03/utilities/meta/meta_base.pass.cpp   | 10 --
 libcxx/test/libcxx-03/utilities/no_destroy.pass.cpp|  4 +---
 .../utility/private_constructor_tag.compile.pass.cpp   |  4 +---
 28 files changed, 33 insertions(+), 89 deletions(-)

diff --git 
a/libcxx/test/extensions/libcxx/depr/depr.c.headers/extern_c.pass.cpp 
b/libcxx/test/extensions/libcxx/depr/depr.c.headers/extern_c.pass.cpp
index f756aacbc1cd5..44f2844773466 100644
--- a/libcxx/test/extensions/libcxx/depr/depr.c.headers/extern_c.pass.cpp
+++ b/libcxx/test/extensions/libcxx/depr/depr.c.headers/extern_c.pass.cpp
@@ -10,13 +10,11 @@
 // that we don't want to support and can't support with LSV enabled.
 // UNSUPPORTED: clang-modules-build
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
-
 // Sometimes C++'s  headers get included within extern "C" contexts. 
This
 // is ill-formed (no diagnostic required), per [using.headers]p3, but we permit
 // it as an extension.
 
-#include <__config>
+#include <__cxx03/__config>
 
 extern "C" {
 #include 
diff --git a/libcxx/test/libcxx-03/algorithms/half_positive.pass.cpp 
b/libcxx/test/libcxx-03/algorithms/half_positive.pass.cpp
index 88a18e8592921..292fcf356554b 100644
--- a/libcxx/test/libcxx-03/algorithms/half_positive.pass.cpp
+++ b/libcxx/test/libcxx-03/algorithms/half_positive.pass.cpp
@@ -11,9 +11,7 @@
 // __half_positive divides an integer number by 2 as unsigned number for known 
types.
 // It can be an important optimization for lower bound, for example.
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
-
-#include <__algorithm/half_positive.h>
+#include <__cxx03/__algorithm/half_positive.h>
 #include 
 #include 
 #include 
diff --git a/libcxx/test/libcxx-03/assertions/default_verbose_abort.pass.cpp 
b/libcxx/test/libcxx-03/assertions/default_verbose_abort.pass.cpp
index 803868b757794..27169da5e1c41 100644
--- a/libcxx/test/libcxx-03/assertions/default_verbose_abort.pass.cpp
+++ b/libcxx/test/libcxx-03/assertions/default_verbose_abort.pass.cpp
@@ -9,9 +9,7 @@
 // Test that the default verbose termination function aborts the program.
 // XFAIL: availability-verbose_abort-missing
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
-
-#include <__verbose_abort>
+#include <__cxx03/__verbose_abort>
 #include 
 #include 
 
diff --git a/libcxx/test/libcxx-03/assertions/modes/none.pass.cpp 
b/libcxx/test/libcxx-03/assertions/modes/none.pass.cpp
index b64290a31a129..e79dee906ae69 100644
--- a/libcxx/test/libcxx-03/assertions/modes/none.pass.cpp
+++ b/libcxx/test/libcxx-03/assertions/modes/none.pass.cpp
@@ -11,9 +11,7 @@
 
 // REQUIRES: libcpp-hardening-mode=none
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
-
-#include <__assert>
+#include <__cxx03/__assert>
 #include 
 
 bool executed_condition = false;
diff --git a/libcxx/test/libcxx-03/assertions/single_expression.pass.cpp 
b/libcxx/test/libcxx-03/assertions/single_expression.pass.cpp
index 474edc9dc0833..bbda6f11e4f6a 100644
--- a/libcxx/test/libcxx-03/assertions/single_expression.pass.cpp
+++ b/libcxx/test/libcxx-03/assertions/single_exp

[llvm-branch-commits] [libcxx] [libc++][C++03] Fix tests which only fail due to incorrect includes (PR #144110)

2025-06-18 Thread Louis Dionne via llvm-branch-commits

https://github.com/ldionne approved this pull request.


https://github.com/llvm/llvm-project/pull/144110
___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] [libc++][C++03] Fix tests which only fail due to incorrect includes (PR #144110)

2025-06-13 Thread Nikolas Klauser via llvm-branch-commits

https://github.com/philnik777 created 
https://github.com/llvm/llvm-project/pull/144110

Quite a few of the frozen header tests only fail because the include path is 
incorrect due to copying the headers. This patch fixes the tests where that's 
the only problem.

This is part of https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc.


>From 748f899d6b70933aa50f73bbe45ab198b8aacc38 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser 
Date: Fri, 13 Jun 2025 18:14:22 +0200
Subject: [PATCH] [libc++][C++03] Fix tests which only fail due to incorrect
 includes

---
 .../test/libcxx-03/algorithms/half_positive.pass.cpp   |  4 +---
 .../assertions/default_verbose_abort.pass.cpp  |  4 +---
 libcxx/test/libcxx-03/assertions/modes/none.pass.cpp   |  4 +---
 .../libcxx-03/assertions/single_expression.pass.cpp|  4 +---
 .../associative/tree_balance_after_insert.pass.cpp |  4 +---
 .../associative/tree_key_value_traits.pass.cpp |  4 +---
 .../containers/associative/tree_left_rotate.pass.cpp   |  4 +---
 .../containers/associative/tree_remove.pass.cpp|  4 +---
 .../containers/associative/tree_right_rotate.pass.cpp  |  4 +---
 .../containers/unord/key_value_traits.pass.cpp |  4 +---
 .../libcxx-03/containers/unord/next_prime.pass.cpp |  4 +---
 .../libcxx-03/depr/depr.c.headers/extern_c.pass.cpp|  4 +---
 .../libcxx-03/iterators/aliasing_iterator.pass.cpp |  4 +---
 .../iterators/bounded_iter/arithmetic.pass.cpp |  4 +---
 .../iterators/bounded_iter/pointer_traits.pass.cpp |  4 +---
 .../iterators/bounded_iter/types.compile.pass.cpp  |  4 +---
 libcxx/test/libcxx-03/memory/allocation_guard.pass.cpp |  4 +---
 libcxx/test/libcxx-03/memory/swap_allocator.pass.cpp   |  4 +---
 .../test/libcxx-03/numerics/clamp_to_integral.pass.cpp |  4 +---
 libcxx/test/libcxx-03/selftest/test_macros.pass.cpp|  4 +---
 .../strings/c.strings/constexpr_memmove.pass.cpp   |  4 +---
 .../is_trivially_comparable.compile.pass.cpp   |  8 +++-
 .../is_trivially_relocatable.compile.pass.cpp  |  4 +---
 .../libcxx-03/utilities/exception_guard.odr.sh.cpp |  4 +---
 .../libcxx-03/utilities/is_pointer_in_range.pass.cpp   |  4 +---
 .../test/libcxx-03/utilities/is_valid_range.pass.cpp   |  4 +---
 .../test/libcxx-03/utilities/meta/meta_base.pass.cpp   | 10 --
 libcxx/test/libcxx-03/utilities/no_destroy.pass.cpp|  4 +---
 .../utility/private_constructor_tag.compile.pass.cpp   |  4 +---
 29 files changed, 34 insertions(+), 92 deletions(-)

diff --git a/libcxx/test/libcxx-03/algorithms/half_positive.pass.cpp 
b/libcxx/test/libcxx-03/algorithms/half_positive.pass.cpp
index 88a18e8592921..292fcf356554b 100644
--- a/libcxx/test/libcxx-03/algorithms/half_positive.pass.cpp
+++ b/libcxx/test/libcxx-03/algorithms/half_positive.pass.cpp
@@ -11,9 +11,7 @@
 // __half_positive divides an integer number by 2 as unsigned number for known 
types.
 // It can be an important optimization for lower bound, for example.
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
-
-#include <__algorithm/half_positive.h>
+#include <__cxx03/__algorithm/half_positive.h>
 #include 
 #include 
 #include 
diff --git a/libcxx/test/libcxx-03/assertions/default_verbose_abort.pass.cpp 
b/libcxx/test/libcxx-03/assertions/default_verbose_abort.pass.cpp
index 803868b757794..27169da5e1c41 100644
--- a/libcxx/test/libcxx-03/assertions/default_verbose_abort.pass.cpp
+++ b/libcxx/test/libcxx-03/assertions/default_verbose_abort.pass.cpp
@@ -9,9 +9,7 @@
 // Test that the default verbose termination function aborts the program.
 // XFAIL: availability-verbose_abort-missing
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
-
-#include <__verbose_abort>
+#include <__cxx03/__verbose_abort>
 #include 
 #include 
 
diff --git a/libcxx/test/libcxx-03/assertions/modes/none.pass.cpp 
b/libcxx/test/libcxx-03/assertions/modes/none.pass.cpp
index b64290a31a129..e79dee906ae69 100644
--- a/libcxx/test/libcxx-03/assertions/modes/none.pass.cpp
+++ b/libcxx/test/libcxx-03/assertions/modes/none.pass.cpp
@@ -11,9 +11,7 @@
 
 // REQUIRES: libcpp-hardening-mode=none
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
-
-#include <__assert>
+#include <__cxx03/__assert>
 #include 
 
 bool executed_condition = false;
diff --git a/libcxx/test/libcxx-03/assertions/single_expression.pass.cpp 
b/libcxx/test/libcxx-03/assertions/single_expression.pass.cpp
index 474edc9dc0833..bbda6f11e4f6a 100644
--- a/libcxx/test/libcxx-03/assertions/single_expression.pass.cpp
+++ b/libcxx/test/libcxx-03/assertions/single_expression.pass.cpp
@@ -10,9 +10,7 @@
 // This is useful so we can use them  in places that require an expression, 
such as
 // in a constructor initializer list.
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
-
-#include <__assert>
+#include <__cxx03/__assert>
 #include 
 
 void f() {
diff --git 
a/libcxx/test/libcxx-03/containers/associative/tree_balance_after_insert.pass.cpp
 
b/libcxx/test/libcxx-03/containers/associative/tree_balance_after_insert.pa