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 #include #include -#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 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 #include 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 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 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 -#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 #include #include 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 -#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 #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 #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 #include 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 #include #include -#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 #include #include -#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 #include 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 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 extern "C" { #include 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 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 #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 -#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 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 #include #include #include #include "test_iterators.h" -#include "test_macros.h" template 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 #include #include 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 #include #include #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 // struct __allocation_guard; -#include <__memory/allocation_guard.h> +#include "test_macros.h" + +#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__memory/allocation_guard.h) #include #include #include 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 - // // template // 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 #include #include 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 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 -#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::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 #include #include 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 #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 #include #include -#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 #include 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/desugars_to.compile.pass.cpp @@ -6,20 +6,18 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: FROZEN-CXX03-HEADERS-FIXME - // This test requires variable templates // UNSUPPORTED: gcc && c++11 -#include <__type_traits/desugars_to.h> +#include "test_macros.h" + +#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__type_traits/desugars_to.h) struct Tag {}; struct Operation {}; -namespace std { template <> -bool const __desugars_to_v = true; -} +bool const std::__desugars_to_v = true; void tests() { // Make sure that __desugars_to is false by default diff --git a/libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp b/libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp index a538c52a534e7..305362bcc3ff7 100644 --- a/libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp +++ b/libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp @@ -14,9 +14,9 @@ // returns false when there's no constant evaluation support from the compiler. // as well as when called not in a constexpr context -// XFAIL: FROZEN-CXX03-HEADERS-FIXME +#include "test_macros.h" -#include <__type_traits/is_constant_evaluated.h> +#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__type_traits/is_constant_evaluated.h) #include #include "test_macros.h" diff --git a/libcxx/test/libcxx/type_traits/is_trivially_comparable.compile.pass.cpp b/libcxx/test/libcxx/type_traits/is_trivially_comparable.compile.pass.cpp index e9b53080fcd6d..7d1a77a65a4f4 100644 --- a/libcxx/test/libcxx/type_traits/is_trivially_comparable.compile.pass.cpp +++ b/libcxx/test/libcxx/type_traits/is_trivially_comparable.compile.pass.cpp @@ -6,11 +6,11 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME +#include "test_macros.h" -#include <__type_traits/conditional.h> -#include <__type_traits/is_equality_comparable.h> -#include <__type_traits/is_signed.h> +#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__type_traits/conditional.h) +#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__type_traits/is_equality_comparable.h) +#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__type_traits/is_signed.h) #include enum Enum : int {}; diff --git a/libcxx/test/libcxx/type_traits/is_trivially_relocatable.compile.pass.cpp b/libcxx/test/libcxx/type_traits/is_trivially_relocatable.compile.pass.cpp index 213d06d314a07..600ab7aea671c 100644 --- a/libcxx/test/libcxx/type_traits/is_trivially_relocatable.compile.pass.cpp +++ b/libcxx/test/libcxx/type_traits/is_trivially_relocatable.compile.pass.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME +#include "test_macros.h" -#include <__type_traits/is_trivially_relocatable.h> +#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__type_traits/is_trivially_relocatable.h) #include #include #include @@ -22,7 +22,6 @@ #include "constexpr_char_traits.h" #include "test_allocator.h" -#include "test_macros.h" #ifndef TEST_HAS_NO_LOCALIZATION # include diff --git a/libcxx/test/libcxx/utilities/exception_guard.odr.sh.cpp b/libcxx/test/libcxx/utilities/exception_guard.odr.sh.cpp index fb51a4bf4ed27..c2367d151d25c 100644 --- a/libcxx/test/libcxx/utilities/exception_guard.odr.sh.cpp +++ b/libcxx/test/libcxx/utilities/exception_guard.odr.sh.cpp @@ -9,8 +9,6 @@ // This test relies on `typeid` and thus requires `-frtti`. // UNSUPPORTED: no-rtti -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // Make sure that we don't get ODR violations with __exception_guard when // linking together TUs compiled with different values of -f[no-]exceptions. @@ -19,7 +17,9 @@ // RUN: %{cxx} %{flags} %{link_flags} -o %t.exe %t.except.o %t.noexcept.o // RUN: %{run} -#include <__utility/exception_guard.h> +#include "test_macros.h" + +#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__utility/exception_guard.h) #include #include #include diff --git a/libcxx/test/libcxx/utilities/is_pointer_in_range.pass.cpp b/libcxx/test/libcxx/utilities/is_pointer_in_range.pass.cpp index b0a27c79287d4..5f7131d03f421 100644 --- a/libcxx/test/libcxx/utilities/is_pointer_in_range.pass.cpp +++ b/libcxx/test/libcxx/utilities/is_pointer_in_range.pass.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME +#include "test_macros.h" -#include <__utility/is_pointer_in_range.h> +#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__utility/is_pointer_in_range.h) #include #include "test_macros.h" diff --git a/libcxx/test/libcxx/utilities/is_valid_range.pass.cpp b/libcxx/test/libcxx/utilities/is_valid_range.pass.cpp index cb800aee5674b..0c9d96b46467d 100644 --- a/libcxx/test/libcxx/utilities/is_valid_range.pass.cpp +++ b/libcxx/test/libcxx/utilities/is_valid_range.pass.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME +#include "test_macros.h" -#include <__utility/is_valid_range.h> +#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__utility/is_valid_range.h) #include #include "test_macros.h" diff --git a/libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp b/libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp index 66c25b1d75638..c3a1b885ffec4 100644 --- a/libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp +++ b/libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp @@ -7,19 +7,20 @@ //===----------------------------------------------------------------------===// // -// XFAIL: FROZEN-CXX03-HEADERS-FIXME +// ADDITIONAL_COMPILE_FLAGS: -Wprivate-header #include "test_macros.h" -TEST_CLANG_DIAGNOSTIC_IGNORED("-Wprivate-header") -#include <__type_traits/conjunction.h> -#include <__type_traits/disjunction.h> -#include <__type_traits/is_valid_expansion.h> -#include <__type_traits/negation.h> +#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__type_traits/conjunction.h) +#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__type_traits/disjunction.h) +#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__type_traits/is_valid_expansion.h) +#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__type_traits/negation.h) #include #include #include +#include "test_macros.h" + struct Bomb; template struct BOOM { diff --git a/libcxx/test/libcxx/utilities/no_destroy.pass.cpp b/libcxx/test/libcxx/utilities/no_destroy.pass.cpp index 8693bb17089dc..dbd7297b730a2 100644 --- a/libcxx/test/libcxx/utilities/no_destroy.pass.cpp +++ b/libcxx/test/libcxx/utilities/no_destroy.pass.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME +#include "test_macros.h" -#include <__utility/no_destroy.h> +#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__utility/no_destroy.h) #include #include "test_macros.h" diff --git a/libcxx/test/libcxx/utilities/utility/private_constructor_tag.compile.pass.cpp b/libcxx/test/libcxx/utilities/utility/private_constructor_tag.compile.pass.cpp index 1644819a02f7f..30b65f71dc0bb 100644 --- a/libcxx/test/libcxx/utilities/utility/private_constructor_tag.compile.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/private_constructor_tag.compile.pass.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // struct __private_constructor_tag{}; // The private constructor tag is intended to be a trivial type that can easily @@ -15,7 +13,9 @@ // // Tests whether the type is trivial. -#include <__utility/private_constructor_tag.h> +#include "test_macros.h" + +#include TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(__utility/private_constructor_tag.h) #include static_assert(std::is_trivially_copyable::value, ""); diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h index 2fc25fc024ac1..5617b4d2a90b2 100644 --- a/libcxx/test/support/test_macros.h +++ b/libcxx/test/support/test_macros.h @@ -20,6 +20,13 @@ # include #endif + +#if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) +# define TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(path) <__cxx03/path> +#else +# define TEST_LIBCPP_INTERNAL_POSSIBLY_FROZEN_INCLUDE(path) +#endif + #define TEST_STRINGIZE_IMPL(...) #__VA_ARGS__ #define TEST_STRINGIZE(...) TEST_STRINGIZE_IMPL(__VA_ARGS__)