[libcxx-commits] [libcxx] [libc++][C++03] Fix tests that are failing due to private includes (PR #139900)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 14 06:50:21 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

<details>
<summary>Changes</summary>



---

Patch is 28.65 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/139900.diff


40 Files Affected:

- (modified) libcxx/test/libcxx/algorithms/half_positive.pass.cpp (+2-3) 
- (modified) libcxx/test/libcxx/algorithms/vectorization.compile.pass.cpp (-2) 
- (modified) libcxx/test/libcxx/assertions/customize_verbose_abort.link-time.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/assertions/modes/none.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/assertions/single_expression.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/containers/associative/tree_balance_after_insert.pass.cpp (+2-4) 
- (modified) libcxx/test/libcxx/containers/associative/tree_key_value_traits.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/containers/associative/tree_left_rotate.pass.cpp (+2-4) 
- (modified) libcxx/test/libcxx/containers/associative/tree_remove.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/containers/associative/tree_right_rotate.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/containers/container_traits.compile.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/containers/unord/key_value_traits.pass.cpp (+2-5) 
- (modified) libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp (+2-4) 
- (modified) libcxx/test/libcxx/containers/unord/next_prime.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/depr/depr.c.headers/extern_c.pass.cpp (+1-3) 
- (modified) libcxx/test/libcxx/iterators/aliasing_iterator.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/iterators/bounded_iter/arithmetic.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/iterators/bounded_iter/comparison.pass.cpp (+2-3) 
- (modified) libcxx/test/libcxx/iterators/bounded_iter/pointer_traits.pass.cpp (+2-3) 
- (modified) libcxx/test/libcxx/iterators/bounded_iter/types.compile.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp (+3-6) 
- (modified) libcxx/test/libcxx/memory/allocation_guard.pass.cpp (+3-3) 
- (modified) libcxx/test/libcxx/memory/swap_allocator.pass.cpp (+3-3) 
- (modified) libcxx/test/libcxx/numerics/bit.ops.pass.cpp (+4-6) 
- (modified) libcxx/test/libcxx/numerics/clamp_to_integral.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/selftest/test_macros.pass.cpp (+1-3) 
- (modified) libcxx/test/libcxx/strings/c.strings/constexpr_memmove.pass.cpp (+2-4) 
- (modified) libcxx/test/libcxx/type_traits/datasizeof.compile.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/type_traits/desugars_to.compile.pass.cpp (+4-6) 
- (modified) libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/type_traits/is_trivially_comparable.compile.pass.cpp (+4-4) 
- (modified) libcxx/test/libcxx/type_traits/is_trivially_relocatable.compile.pass.cpp (+2-3) 
- (modified) libcxx/test/libcxx/utilities/exception_guard.odr.sh.cpp (+3-3) 
- (modified) libcxx/test/libcxx/utilities/is_pointer_in_range.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/utilities/is_valid_range.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp (+7-6) 
- (modified) libcxx/test/libcxx/utilities/no_destroy.pass.cpp (+2-2) 
- (modified) libcxx/test/libcxx/utilities/utility/private_constructor_tag.compile.pass.cpp (+3-3) 
- (modified) libcxx/test/support/test_macros.h (+7) 


``````````diff
diff --git a/libcxx/test/libcxx/algorithms/half_positive.pass.cpp b/libcxx/test/libcxx/algorithms/half_positive.pass.cpp
index 88a18e8592921..0b8a4544e9b39 100644
--- a/libcxx/test/libcxx/algorithms/half_positive.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/half_positive.pass.cpp
@@ -11,14 +11,13 @@
 // __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 "test_macros.h"
 
-#include <__algorithm/half_positive.h>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__algorithm/half_positive.h)
 #include <cassert>
 #include <cstddef>
 #include <limits>
 
-#include "test_macros.h"
 #include "user_defined_integral.h"
 
 namespace {
diff --git a/libcxx/test/libcxx/algorithms/vectorization.compile.pass.cpp b/libcxx/test/libcxx/algorithms/vectorization.compile.pass.cpp
index 733a147b80cc3..61f925ddcdcd1 100644
--- a/libcxx/test/libcxx/algorithms/vectorization.compile.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/vectorization.compile.pass.cpp
@@ -9,8 +9,6 @@
 // We don't know how to vectorize algorithms on GCC
 // XFAIL: gcc
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
-
 // We don't vectorize algorithms before C++14
 // XFAIL: c++03, c++11
 
diff --git a/libcxx/test/libcxx/assertions/customize_verbose_abort.link-time.pass.cpp b/libcxx/test/libcxx/assertions/customize_verbose_abort.link-time.pass.cpp
index 390c6b6db190d..3f1a39d619207 100644
--- a/libcxx/test/libcxx/assertions/customize_verbose_abort.link-time.pass.cpp
+++ b/libcxx/test/libcxx/assertions/customize_verbose_abort.link-time.pass.cpp
@@ -12,9 +12,9 @@
 // failures when back-deploying.
 // XFAIL: availability-verbose_abort-missing
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__verbose_abort>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__verbose_abort)
 #include <cstdlib>
 
 void std::__libcpp_verbose_abort(char const*, ...) _NOEXCEPT { std::exit(EXIT_SUCCESS); }
diff --git a/libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp b/libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp
index 803868b757794..2bab4cffc6eb5 100644
--- a/libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp
+++ b/libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp
@@ -9,9 +9,9 @@
 // Test that the default verbose termination function aborts the program.
 // XFAIL: availability-verbose_abort-missing
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__verbose_abort>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__verbose_abort)
 #include <csignal>
 #include <cstdlib>
 
diff --git a/libcxx/test/libcxx/assertions/modes/none.pass.cpp b/libcxx/test/libcxx/assertions/modes/none.pass.cpp
index b64290a31a129..4fbccd9ef1f97 100644
--- a/libcxx/test/libcxx/assertions/modes/none.pass.cpp
+++ b/libcxx/test/libcxx/assertions/modes/none.pass.cpp
@@ -11,9 +11,9 @@
 
 // REQUIRES: libcpp-hardening-mode=none
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__assert>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__assert)
 #include <cassert>
 
 bool executed_condition = false;
diff --git a/libcxx/test/libcxx/assertions/single_expression.pass.cpp b/libcxx/test/libcxx/assertions/single_expression.pass.cpp
index 474edc9dc0833..4a27127b3f717 100644
--- a/libcxx/test/libcxx/assertions/single_expression.pass.cpp
+++ b/libcxx/test/libcxx/assertions/single_expression.pass.cpp
@@ -10,9 +10,9 @@
 // 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 "test_macros.h"
 
-#include <__assert>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__assert)
 #include <cassert>
 
 void f() {
diff --git a/libcxx/test/libcxx/containers/associative/tree_balance_after_insert.pass.cpp b/libcxx/test/libcxx/containers/associative/tree_balance_after_insert.pass.cpp
index ccd84af44c3a5..a61d792e5048a 100644
--- a/libcxx/test/libcxx/containers/associative/tree_balance_after_insert.pass.cpp
+++ b/libcxx/test/libcxx/containers/associative/tree_balance_after_insert.pass.cpp
@@ -13,13 +13,11 @@
 // void
 // __tree_balance_after_insert(_NodePtr __root, _NodePtr __x)
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__tree>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__tree)
 #include <cassert>
 
-#include "test_macros.h"
-
 struct Node {
   Node* __left_;
   Node* __right_;
diff --git a/libcxx/test/libcxx/containers/associative/tree_key_value_traits.pass.cpp b/libcxx/test/libcxx/containers/associative/tree_key_value_traits.pass.cpp
index e3a5a6f634138..0bf0a703332d3 100644
--- a/libcxx/test/libcxx/containers/associative/tree_key_value_traits.pass.cpp
+++ b/libcxx/test/libcxx/containers/associative/tree_key_value_traits.pass.cpp
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__tree>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__tree)
 #include <map>
 #include <set>
 #include <type_traits>
diff --git a/libcxx/test/libcxx/containers/associative/tree_left_rotate.pass.cpp b/libcxx/test/libcxx/containers/associative/tree_left_rotate.pass.cpp
index d97a1c89f1f70..4bb69fba59e4c 100644
--- a/libcxx/test/libcxx/containers/associative/tree_left_rotate.pass.cpp
+++ b/libcxx/test/libcxx/containers/associative/tree_left_rotate.pass.cpp
@@ -13,13 +13,11 @@
 // void
 // __tree_left_rotate(_NodePtr __x);
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__tree>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__tree)
 #include <cassert>
 
-#include "test_macros.h"
-
 struct Node {
   Node* __left_;
   Node* __right_;
diff --git a/libcxx/test/libcxx/containers/associative/tree_remove.pass.cpp b/libcxx/test/libcxx/containers/associative/tree_remove.pass.cpp
index e543c3360a685..17ca6a85e9859 100644
--- a/libcxx/test/libcxx/containers/associative/tree_remove.pass.cpp
+++ b/libcxx/test/libcxx/containers/associative/tree_remove.pass.cpp
@@ -13,9 +13,9 @@
 // void
 // __tree_remove(_NodePtr __root, _NodePtr __z)
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__tree>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__tree)
 #include <cassert>
 
 #include "test_macros.h"
diff --git a/libcxx/test/libcxx/containers/associative/tree_right_rotate.pass.cpp b/libcxx/test/libcxx/containers/associative/tree_right_rotate.pass.cpp
index b86446f5be101..632e58df6bb5d 100644
--- a/libcxx/test/libcxx/containers/associative/tree_right_rotate.pass.cpp
+++ b/libcxx/test/libcxx/containers/associative/tree_right_rotate.pass.cpp
@@ -13,9 +13,9 @@
 // void
 // __tree_right_rotate(_NodePtr __x);
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__tree>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__tree)
 #include <cassert>
 
 #include "test_macros.h"
diff --git a/libcxx/test/libcxx/containers/container_traits.compile.pass.cpp b/libcxx/test/libcxx/containers/container_traits.compile.pass.cpp
index 22be217487951..e49cba2f58acd 100644
--- a/libcxx/test/libcxx/containers/container_traits.compile.pass.cpp
+++ b/libcxx/test/libcxx/containers/container_traits.compile.pass.cpp
@@ -9,9 +9,9 @@
 // <__type_traits/container_traits.h>
 //
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__type_traits/container_traits.h>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__type_traits/container_traits.h)
 
 #include <deque>
 #include <forward_list>
diff --git a/libcxx/test/libcxx/containers/unord/key_value_traits.pass.cpp b/libcxx/test/libcxx/containers/unord/key_value_traits.pass.cpp
index e00a028489a72..34f07e800138c 100644
--- a/libcxx/test/libcxx/containers/unord/key_value_traits.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/key_value_traits.pass.cpp
@@ -6,16 +6,13 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__hash_table>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__hash_table)
 #include <unordered_map>
 #include <unordered_set>
 #include <type_traits>
 
-#include "test_macros.h"
-#include "min_allocator.h"
-
 void testKeyValueTrait() {
   {
     typedef int Tp;
diff --git a/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp b/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp
index 53a1dd2d3fa76..2cbeb39feaba3 100644
--- a/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp
@@ -18,15 +18,13 @@
 // If n <= 1, return n. If n is a power of 2, return n.
 // Otherwise, return the next power of 2.
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__hash_table>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__hash_table)
 #include <cassert>
 #include <cstdint>
 #include <unordered_map>
 
-#include "test_macros.h"
-
 bool is_power_of_two(unsigned long n) { return __builtin_popcount(n) == 1; }
 
 void test_next_pow2_val(std::size_t n) {
diff --git a/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp b/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp
index 44b0eb96e2b9b..5b3c065235372 100644
--- a/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp
@@ -16,9 +16,9 @@
 
 // If n == 0, return 0, else return the lowest prime greater than or equal to n
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__hash_table>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__hash_table)
 #include <cassert>
 #include <cstddef>
 
diff --git a/libcxx/test/libcxx/depr/depr.c.headers/extern_c.pass.cpp b/libcxx/test/libcxx/depr/depr.c.headers/extern_c.pass.cpp
index f756aacbc1cd5..77c48e2e46766 100644
--- a/libcxx/test/libcxx/depr/depr.c.headers/extern_c.pass.cpp
+++ b/libcxx/test/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 <foo.h> 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 <version>
 
 extern "C" {
 #include <assert.h>
diff --git a/libcxx/test/libcxx/iterators/aliasing_iterator.pass.cpp b/libcxx/test/libcxx/iterators/aliasing_iterator.pass.cpp
index 33774578e2337..3b9bdeb928312 100644
--- a/libcxx/test/libcxx/iterators/aliasing_iterator.pass.cpp
+++ b/libcxx/test/libcxx/iterators/aliasing_iterator.pass.cpp
@@ -8,9 +8,9 @@
 
 // ADDITIONAL_COMPILE_FLAGS(clang): -Wprivate-header
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__iterator/aliasing_iterator.h>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__iterator/aliasing_iterator.h)
 #include <cassert>
 
 struct NonTrivial {
diff --git a/libcxx/test/libcxx/iterators/bounded_iter/arithmetic.pass.cpp b/libcxx/test/libcxx/iterators/bounded_iter/arithmetic.pass.cpp
index 3fc735b441676..da204c71c3623 100644
--- a/libcxx/test/libcxx/iterators/bounded_iter/arithmetic.pass.cpp
+++ b/libcxx/test/libcxx/iterators/bounded_iter/arithmetic.pass.cpp
@@ -11,9 +11,9 @@
 //
 // Arithmetic operators
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__iterator/bounded_iter.h>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__iterator/bounded_iter.h)
 #include <cstddef>
 
 #include "test_iterators.h"
diff --git a/libcxx/test/libcxx/iterators/bounded_iter/comparison.pass.cpp b/libcxx/test/libcxx/iterators/bounded_iter/comparison.pass.cpp
index a12b77afa0db0..cd9260752c5cf 100644
--- a/libcxx/test/libcxx/iterators/bounded_iter/comparison.pass.cpp
+++ b/libcxx/test/libcxx/iterators/bounded_iter/comparison.pass.cpp
@@ -11,13 +11,12 @@
 //
 // Comparison operators
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
 #include <concepts>
-#include <__iterator/bounded_iter.h>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__iterator/bounded_iter.h)
 
 #include "test_iterators.h"
-#include "test_macros.h"
 
 template <class Iter>
 TEST_CONSTEXPR_CXX14 bool tests() {
diff --git a/libcxx/test/libcxx/iterators/bounded_iter/pointer_traits.pass.cpp b/libcxx/test/libcxx/iterators/bounded_iter/pointer_traits.pass.cpp
index 22ad8c6706d6f..e23ebd1ccf1e7 100644
--- a/libcxx/test/libcxx/iterators/bounded_iter/pointer_traits.pass.cpp
+++ b/libcxx/test/libcxx/iterators/bounded_iter/pointer_traits.pass.cpp
@@ -11,16 +11,15 @@
 //
 // std::pointer_traits specialization
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__iterator/bounded_iter.h>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__iterator/bounded_iter.h)
 #include <cassert>
 #include <cstddef>
 #include <memory>
 #include <type_traits>
 
 #include "test_iterators.h"
-#include "test_macros.h"
 
 template <class Iter>
 TEST_CONSTEXPR_CXX14 bool tests() {
diff --git a/libcxx/test/libcxx/iterators/bounded_iter/types.compile.pass.cpp b/libcxx/test/libcxx/iterators/bounded_iter/types.compile.pass.cpp
index d205c5b03ee3f..5796c08434404 100644
--- a/libcxx/test/libcxx/iterators/bounded_iter/types.compile.pass.cpp
+++ b/libcxx/test/libcxx/iterators/bounded_iter/types.compile.pass.cpp
@@ -11,9 +11,9 @@
 //
 // Nested types
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__iterator/bounded_iter.h>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__iterator/bounded_iter.h)
 #include <cstddef>
 #include <iterator>
 #include <type_traits>
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 7ead65caf9fda..652243ab6ad5f 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
@@ -21,8 +21,6 @@
 // GCC doesn't support the aligned-allocation flags.
 // XFAIL: gcc
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
-
 // RUN: %{build} -faligned-allocation -fsized-deallocation
 // RUN: %{run}
 // RUN: %{build} -faligned-allocation -fno-sized-deallocation -DNO_SIZE
@@ -32,16 +30,15 @@
 // RUN: %{build} -fno-aligned-allocation -fno-sized-deallocation -DNO_ALIGN -DNO_SIZE
 // RUN: %{run}
 
+// ADDITIONAL_COMPILE_FLAGS: -Wprivate-header
+
 #include <cassert>
 #include <cstdlib>
 #include <new>
 
 #include "test_macros.h"
 
-TEST_DIAGNOSTIC_PUSH
-TEST_CLANG_DIAGNOSTIC_IGNORED("-Wprivate-header")
-#include <__memory/aligned_alloc.h>
-TEST_DIAGNOSTIC_POP
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__memory/aligned_alloc.h)
 
 struct alloc_stats {
   alloc_stats() { reset(); }
diff --git a/libcxx/test/libcxx/memory/allocation_guard.pass.cpp b/libcxx/test/libcxx/memory/allocation_guard.pass.cpp
index 20c05b381ef0e..8011305d52ac6 100644
--- a/libcxx/test/libcxx/memory/allocation_guard.pass.cpp
+++ b/libcxx/test/libcxx/memory/allocation_guard.pass.cpp
@@ -12,12 +12,12 @@
 // To allow checking that self-move works correctly.
 // ADDITIONAL_COMPILE_FLAGS: -Wno-self-move
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
-
 // template<class _Alloc>
 // struct __allocation_guard;
 
-#include <__memory/allocation_guard.h>
+#include "test_macros.h"
+
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__memory/allocation_guard.h)
 #include <cassert>
 #include <type_traits>
 #include <utility>
diff --git a/libcxx/test/libcxx/memory/swap_allocator.pass.cpp b/libcxx/test/libcxx/memory/swap_allocator.pass.cpp
index f70f8134d1dda..8d34117e646de 100644
--- a/libcxx/test/libcxx/memory/swap_allocator.pass.cpp
+++ b/libcxx/test/libcxx/memory/swap_allocator.pass.cpp
@@ -7,14 +7,14 @@
 //===----------------------------------------------------------------------===//
 //
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
-
 // <memory>
 
 // template <typename _Alloc>
 // void __swap_allocator(_Alloc& __a1, _Alloc& __a2);
 
-#include <__memory/swap_allocator.h>
+#include "test_macros.h"
+
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__memory/swap_allocator.h)
 #include <cassert>
 #include <memory>
 #include <utility>
diff --git a/libcxx/test/libcxx/numerics/bit.ops.pass.cpp b/libcxx/test/libcxx/numerics/bit.ops.pass.cpp
index 1bf9d3890f45f..37c3233765fa5 100644
--- a/libcxx/test/libcxx/numerics/bit.ops.pass.cpp
+++ b/libcxx/test/libcxx/numerics/bit.ops.pass.cpp
@@ -9,15 +9,13 @@
 // Test the __XXXX routines in the <bit> header.
 // These are not supposed to be exhaustive tests, just sanity checks.
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__bit/bit_log2.h>
-#include <__bit/countl.h>
-#include <__bit/rotate.h>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__bit/bit_log2.h)
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__bit/countl.h)
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__bit/rotate.h)
 #include <cassert>
 
-#include "test_macros.h"
-
 TEST_CONSTEXPR_CXX14 bool test() {
   const unsigned v = 0x12345678;
 
diff --git a/libcxx/test/libcxx/numerics/clamp_to_integral.pass.cpp b/libcxx/test/libcxx/numerics/clamp_to_integral.pass.cpp
index 68d55afa1f280..03aab3fab56e7 100644
--- a/libcxx/test/libcxx/numerics/clamp_to_integral.pass.cpp
+++ b/libcxx/test/libcxx/numerics/clamp_to_integral.pass.cpp
@@ -12,9 +12,9 @@
 // closest representable value for the specified integer type, or
 // numeric_limits<IntT>::max()/min() if the value isn't representable.
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__random/clamp_to_integral.h>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__random/clamp_to_integral.h)
 #include <cassert>
 #include <cmath>
 #include <limits>
diff --git a/libcxx/test/libcxx/selftest/test_macros.pass.cpp b/libcxx/test/libcxx/selftest/test_macros.pass.cpp
index 9bcf7cf9a31f5..9b0dd335f03b5 100644
--- a/libcxx/test/libcxx/selftest/test_macros.pass.cpp
+++ b/libcxx/test/libcxx/selftest/test_macros.pass.cpp
@@ -8,9 +8,7 @@
 //
 // Test the "test_macros.h" header.
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
-
-#include <__config>
+#include <version>
 #include "test_macros.h"
 
 #ifndef TEST_STD_VER
diff --git a/libcxx/test/libcxx/strings/c.strings/constexpr_memmove.pass.cpp b/libcxx/test/libcxx/strings/c.strings/constexpr_memmove.pass.cpp
index 2009cbe28a91f..046703416e606 100644
--- a/libcxx/test/libcxx/strings/c.strings/constexpr_memmove.pass.cpp
+++ b/libcxx/test/libcxx/strings/c.strings/constexpr_memmove.pass.cpp
@@ -19,15 +19,13 @@
 // and is_trivially_XXX_assignable), so we use some funky types to test these
 // corner cases.
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__string/constexpr_c_functions.h>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__string/constexpr_c_functions.h)
 #include <cassert>
 #include <cstdint>
 #include <type_traits>
 
-#include "test_macros.h"
-
 // The following types are all TriviallyCopyable, but they are not all
 // trivially_{copy,move}_{constructible,assignable}. TriviallyCopyable
 // guarantees that the type is *at least* one of the four, but no more
diff --git a/libcxx/test/libcxx/type_traits/datasizeof.compile.pass.cpp b/libcxx/test/libcxx/type_traits/datasizeof.compile.pass.cpp
index 67a4dccb0f5fe..b7dda9b169328 100644
--- a/libcxx/test/libcxx/type_traits/datasizeof.compile.pass.cpp
+++ b/libcxx/test/libcxx/type_traits/datasizeof.compile.pass.cpp
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+#include "test_macros.h"
 
-#include <__type_traits/datasizeof.h>
+#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__type_traits/datasizeof.h)
 #include <cstdint>
 #include <type_traits>
 
diff --git a/libcxx/test/libcxx/type_traits/desugars_to.compile.pass.cpp b/libcxx/test/libcxx/type_traits/desugars_to.compile.pass.cpp
index 4ed6d15ee9e95..a22a178d6ca2e 100644
--- a/libcxx/test/libcxx/type_traits/desugars_to.compile.pass.cpp
+++ b/libcxx/test/libcxx/type_traits/de...
[truncated]

``````````

</details>


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


More information about the libcxx-commits mailing list