From 430b397f6715d4d2f2569716c93fcd6292ace3dc Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 20 Dec 2022 21:13:12 +0100 Subject: [PATCH] [libc++] Granularize includes in Reviewed By: Mordante, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D140621 --- libcxx/include/__algorithm/shuffle.h | 1 + libcxx/include/__algorithm/sort.h | 3 ++ libcxx/include/__debug | 2 +- libcxx/include/__iterator/bounded_iter.h | 3 +- libcxx/include/__iterator/common_iterator.h | 2 ++ libcxx/include/__iterator/counted_iterator.h | 3 +- libcxx/include/__iterator/move_iterator.h | 6 +++- libcxx/include/__iterator/projected.h | 2 +- libcxx/include/__iterator/size.h | 3 +- libcxx/include/__iterator/wrap_iter.h | 3 +- .../__memory/uses_allocator_construction.h | 2 ++ libcxx/include/__tree | 12 +++++++ libcxx/include/experimental/iterator | 1 + libcxx/include/fstream | 1 + libcxx/include/iterator | 2 +- libcxx/include/locale | 1 + libcxx/include/module.modulemap.in | 15 ++++++-- libcxx/include/scoped_allocator | 1 + libcxx/include/tuple | 36 ++++++++++++++++++- libcxx/include/variant | 19 +++++++++- .../cpp20_iter_concepts.pass.cpp | 4 +++ .../test/libcxx/transitive_includes/cxx2b.csv | 5 --- .../indirectly_readable.compile.pass.cpp | 4 +-- .../iter_common_reference_t.compile.pass.cpp | 4 +-- .../iterators.common/ctor.converting.pass.cpp | 5 ++- .../move.sentinel/assign.converting.pass.cpp | 3 +- .../move.sentinel/ctor.converting.pass.cpp | 3 +- .../move.sentinel/ctor.sentinel.pass.cpp | 3 +- .../expos.only.func/synth_three_way.pass.cpp | 1 + .../tuple/tuple.general/ignore.pass.cpp | 3 +- ...PR22806_constrain_tuple_like_ctor.pass.cpp | 5 +-- libcxx/test/support/min_allocator.h | 6 ++-- 32 files changed, 130 insertions(+), 34 deletions(-) diff --git a/libcxx/include/__algorithm/shuffle.h b/libcxx/include/__algorithm/shuffle.h index c2f5c37efa8d..f7bce68697b5 100644 --- a/libcxx/include/__algorithm/shuffle.h +++ b/libcxx/include/__algorithm/shuffle.h @@ -16,6 +16,7 @@ #include <__random/uniform_int_distribution.h> #include <__utility/forward.h> #include <__utility/move.h> +#include <__utility/swap.h> #include #include diff --git a/libcxx/include/__algorithm/sort.h b/libcxx/include/__algorithm/sort.h index 5cb496d2e678..76786baf02ad 100644 --- a/libcxx/include/__algorithm/sort.h +++ b/libcxx/include/__algorithm/sort.h @@ -26,9 +26,12 @@ #include <__iterator/iterator_traits.h> #include <__memory/destruct_n.h> #include <__memory/unique_ptr.h> +#include <__type_traits/conditional.h> +#include <__type_traits/is_arithmetic.h> #include <__utility/move.h> #include <__utility/pair.h> #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__debug b/libcxx/include/__debug index ae0c1a5af06e..140cc9142a82 100644 --- a/libcxx/include/__debug +++ b/libcxx/include/__debug @@ -12,8 +12,8 @@ #include <__assert> #include <__config> +#include <__type_traits/is_constant_evaluated.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__iterator/bounded_iter.h b/libcxx/include/__iterator/bounded_iter.h index 64cdadb02cda..69d237a18010 100644 --- a/libcxx/include/__iterator/bounded_iter.h +++ b/libcxx/include/__iterator/bounded_iter.h @@ -14,8 +14,9 @@ #include <__config> #include <__iterator/iterator_traits.h> #include <__memory/pointer_traits.h> +#include <__type_traits/enable_if.h> +#include <__type_traits/is_convertible.h> #include <__utility/move.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__iterator/common_iterator.h b/libcxx/include/__iterator/common_iterator.h index d0947bbd07f3..e45f60237304 100644 --- a/libcxx/include/__iterator/common_iterator.h +++ b/libcxx/include/__iterator/common_iterator.h @@ -25,6 +25,8 @@ #include <__iterator/iter_swap.h> #include <__iterator/iterator_traits.h> #include <__iterator/readable_traits.h> +#include <__type_traits/is_pointer.h> +#include <__utility/declval.h> #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__iterator/counted_iterator.h b/libcxx/include/__iterator/counted_iterator.h index 5edd9c9422c5..5fdbff4b4866 100644 --- a/libcxx/include/__iterator/counted_iterator.h +++ b/libcxx/include/__iterator/counted_iterator.h @@ -25,9 +25,10 @@ #include <__iterator/iterator_traits.h> #include <__iterator/readable_traits.h> #include <__memory/pointer_traits.h> +#include <__type_traits/add_pointer.h> +#include <__type_traits/conditional.h> #include <__utility/move.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__iterator/move_iterator.h b/libcxx/include/__iterator/move_iterator.h index b4f2f9ec3d5c..6475f722778d 100644 --- a/libcxx/include/__iterator/move_iterator.h +++ b/libcxx/include/__iterator/move_iterator.h @@ -24,8 +24,12 @@ #include <__iterator/iterator_traits.h> #include <__iterator/move_sentinel.h> #include <__iterator/readable_traits.h> +#include <__type_traits/conditional.h> +#include <__type_traits/is_assignable.h> +#include <__type_traits/is_constructible.h> +#include <__type_traits/is_same.h> +#include <__utility/declval.h> #include <__utility/move.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__iterator/projected.h b/libcxx/include/__iterator/projected.h index 3a08b58b8bfb..19c076b2e560 100644 --- a/libcxx/include/__iterator/projected.h +++ b/libcxx/include/__iterator/projected.h @@ -13,7 +13,7 @@ #include <__config> #include <__iterator/concepts.h> #include <__iterator/incrementable_traits.h> -#include +#include <__type_traits/remove_cvref.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__iterator/size.h b/libcxx/include/__iterator/size.h index e06013496668..1452bd1d55cd 100644 --- a/libcxx/include/__iterator/size.h +++ b/libcxx/include/__iterator/size.h @@ -11,8 +11,9 @@ #define _LIBCPP___ITERATOR_SIZE_H #include <__config> +#include <__type_traits/common_type.h> +#include <__type_traits/make_signed.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__iterator/wrap_iter.h b/libcxx/include/__iterator/wrap_iter.h index 80be74ef58f8..16defc1d8b02 100644 --- a/libcxx/include/__iterator/wrap_iter.h +++ b/libcxx/include/__iterator/wrap_iter.h @@ -15,7 +15,8 @@ #include <__iterator/iterator_traits.h> #include <__memory/addressof.h> #include <__memory/pointer_traits.h> -#include +#include <__type_traits/enable_if.h> +#include <__type_traits/is_convertible.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__memory/uses_allocator_construction.h b/libcxx/include/__memory/uses_allocator_construction.h index 02e0668d1233..0f63b080daf3 100644 --- a/libcxx/include/__memory/uses_allocator_construction.h +++ b/libcxx/include/__memory/uses_allocator_construction.h @@ -14,6 +14,8 @@ #include <__memory/uses_allocator.h> #include <__type_traits/enable_if.h> #include <__type_traits/is_same.h> +#include <__type_traits/remove_cv.h> +#include <__utility/declval.h> #include <__utility/pair.h> #include diff --git a/libcxx/include/__tree b/libcxx/include/__tree index 05a3da158098..f5d9d595b4b2 100644 --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -14,6 +14,7 @@ #include <__assert> #include <__config> #include <__debug> +#include <__functional/invoke.h> #include <__iterator/distance.h> #include <__iterator/iterator_traits.h> #include <__iterator/next.h> @@ -23,6 +24,17 @@ #include <__memory/swap_allocator.h> #include <__memory/unique_ptr.h> #include <__type_traits/can_extract_key.h> +#include <__type_traits/conditional.h> +#include <__type_traits/is_const.h> +#include <__type_traits/is_nothrow_copy_constructible.h> +#include <__type_traits/is_nothrow_default_constructible.h> +#include <__type_traits/is_nothrow_move_assignable.h> +#include <__type_traits/is_nothrow_move_constructible.h> +#include <__type_traits/is_pointer.h> +#include <__type_traits/is_same.h> +#include <__type_traits/is_swappable.h> +#include <__type_traits/remove_const_ref.h> +#include <__type_traits/remove_cvref.h> #include <__utility/forward.h> #include <__utility/move.h> #include <__utility/pair.h> diff --git a/libcxx/include/experimental/iterator b/libcxx/include/experimental/iterator index 399365ed0c74..cf73b74e887e 100644 --- a/libcxx/include/experimental/iterator +++ b/libcxx/include/experimental/iterator @@ -54,6 +54,7 @@ namespace std { #include <__assert> // all public C++ headers provide the assertion handler #include <__memory/addressof.h> +#include <__type_traits/decay.h> #include <__utility/forward.h> #include <__utility/move.h> #include diff --git a/libcxx/include/fstream b/libcxx/include/fstream index 0c09f21913ec..41e95bf3dc66 100644 --- a/libcxx/include/fstream +++ b/libcxx/include/fstream @@ -1757,6 +1757,7 @@ _LIBCPP_POP_MACROS # include # include # include +# include #endif #endif // _LIBCPP_FSTREAM diff --git a/libcxx/include/iterator b/libcxx/include/iterator index 679b3da31724..35eca67b4a5e 100644 --- a/libcxx/include/iterator +++ b/libcxx/include/iterator @@ -719,7 +719,6 @@ template constexpr const E* data(initializer_list il) noexcept; #include <__memory/pointer_traits.h> #include #include -#include #include // standard-mandated includes @@ -735,6 +734,7 @@ template constexpr const E* data(initializer_list il) noexcept; #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include # include # include #endif diff --git a/libcxx/include/locale b/libcxx/include/locale index 31804552844f..f322a1183f02 100644 --- a/libcxx/include/locale +++ b/libcxx/include/locale @@ -4369,6 +4369,7 @@ _LIBCPP_POP_MACROS # include # include # include +# include # include #endif diff --git a/libcxx/include/module.modulemap.in b/libcxx/include/module.modulemap.in index bff3f7e48dae..5a69bea5b3a6 100644 --- a/libcxx/include/module.modulemap.in +++ b/libcxx/include/module.modulemap.in @@ -892,7 +892,10 @@ module std [system] { module hash { private header "__functional/hash.h" } module hash_fwd { private header "__fwd/hash.h" } module identity { private header "__functional/identity.h" } - module invoke { private header "__functional/invoke.h" } + module invoke { + private header "__functional/invoke.h" + export type_traits + } module is_transparent { private header "__functional/is_transparent.h" } module mem_fn { private header "__functional/mem_fn.h" } module mem_fun_ref { private header "__functional/mem_fun_ref.h" } @@ -1408,7 +1411,10 @@ module std [system] { module is_convertible { private header "__type_traits/is_convertible.h" } module is_copy_assignable { private header "__type_traits/is_copy_assignable.h" } module is_copy_constructible { private header "__type_traits/is_copy_constructible.h" } - module is_core_convertible { private header "__type_traits/is_core_convertible.h" } + module is_core_convertible { + private header "__type_traits/is_core_convertible.h" + export integral_constant + } module is_default_constructible { private header "__type_traits/is_default_constructible.h" } module is_destructible { private header "__type_traits/is_destructible.h" } module is_empty { private header "__type_traits/is_empty.h" } @@ -1469,7 +1475,10 @@ module std [system] { module is_unsigned { private header "__type_traits/is_unsigned.h" } module is_unsigned_integer { private header "__type_traits/is_unsigned_integer.h" } module is_valid_expansion { private header "__type_traits/is_valid_expansion.h" } - module is_void { private header "__type_traits/is_void.h" } + module is_void { + private header "__type_traits/is_void.h" + export integral_constant + } module is_volatile { private header "__type_traits/is_volatile.h" } module lazy { private header "__type_traits/lazy.h" } module make_32_64_or_128_bit { private header "__type_traits/make_32_64_or_128_bit.h" } diff --git a/libcxx/include/scoped_allocator b/libcxx/include/scoped_allocator index 56cb9ee40cdb..88e56c2b09e7 100644 --- a/libcxx/include/scoped_allocator +++ b/libcxx/include/scoped_allocator @@ -118,6 +118,7 @@ template #include <__type_traits/integral_constant.h> #include <__type_traits/is_constructible.h> #include <__type_traits/remove_reference.h> +#include <__utility/declval.h> #include <__utility/forward.h> #include <__utility/move.h> #include <__utility/pair.h> diff --git a/libcxx/include/tuple b/libcxx/include/tuple index 7149875be4be..b75d00c4e431 100644 --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -205,11 +205,45 @@ template #include <__compare/common_comparison_category.h> #include <__compare/synth_three_way.h> #include <__config> +#include <__functional/invoke.h> #include <__functional/unwrap_ref.h> #include <__fwd/array.h> #include <__memory/allocator_arg_t.h> #include <__memory/uses_allocator.h> +#include <__type_traits/apply_cv.h> +#include <__type_traits/common_reference.h> +#include <__type_traits/common_type.h> +#include <__type_traits/conditional.h> +#include <__type_traits/conjunction.h> +#include <__type_traits/copy_cvref.h> +#include <__type_traits/disjunction.h> +#include <__type_traits/is_arithmetic.h> +#include <__type_traits/is_assignable.h> +#include <__type_traits/is_constructible.h> +#include <__type_traits/is_convertible.h> +#include <__type_traits/is_copy_assignable.h> +#include <__type_traits/is_copy_constructible.h> +#include <__type_traits/is_default_constructible.h> +#include <__type_traits/is_empty.h> +#include <__type_traits/is_final.h> +#include <__type_traits/is_implicitly_default_constructible.h> +#include <__type_traits/is_move_assignable.h> +#include <__type_traits/is_move_constructible.h> +#include <__type_traits/is_nothrow_assignable.h> +#include <__type_traits/is_nothrow_constructible.h> +#include <__type_traits/is_nothrow_copy_assignable.h> +#include <__type_traits/is_nothrow_copy_constructible.h> +#include <__type_traits/is_nothrow_default_constructible.h> +#include <__type_traits/is_nothrow_move_assignable.h> +#include <__type_traits/is_reference.h> +#include <__type_traits/is_same.h> +#include <__type_traits/is_swappable.h> +#include <__type_traits/lazy.h> #include <__type_traits/maybe_const.h> +#include <__type_traits/nat.h> +#include <__type_traits/negation.h> +#include <__type_traits/remove_cvref.h> +#include <__type_traits/remove_reference.h> #include <__utility/forward.h> #include <__utility/integer_sequence.h> #include <__utility/move.h> @@ -217,7 +251,6 @@ template #include <__utility/piecewise_construct.h> #include <__utility/swap.h> #include -#include #include // standard-mandated includes @@ -1822,6 +1855,7 @@ _LIBCPP_END_NAMESPACE_STD # include # include # include +# include # include # include #endif diff --git a/libcxx/include/variant b/libcxx/include/variant index 001b86f74660..2379b226b157 100644 --- a/libcxx/include/variant +++ b/libcxx/include/variant @@ -211,9 +211,26 @@ namespace std { #include <__compare/three_way_comparable.h> #include <__config> #include <__functional/hash.h> +#include <__functional/invoke.h> #include <__functional/operations.h> #include <__functional/unary_function.h> +#include <__type_traits/add_const.h> +#include <__type_traits/add_cv.h> +#include <__type_traits/add_pointer.h> +#include <__type_traits/add_volatile.h> #include <__type_traits/dependent_type.h> +#include <__type_traits/is_array.h> +#include <__type_traits/is_destructible.h> +#include <__type_traits/is_nothrow_move_constructible.h> +#include <__type_traits/is_trivially_copy_assignable.h> +#include <__type_traits/is_trivially_copy_constructible.h> +#include <__type_traits/is_trivially_destructible.h> +#include <__type_traits/is_trivially_move_assignable.h> +#include <__type_traits/is_trivially_move_constructible.h> +#include <__type_traits/is_void.h> +#include <__type_traits/remove_const.h> +#include <__type_traits/type_identity.h> +#include <__type_traits/void_t.h> #include <__utility/forward.h> #include <__utility/in_place.h> #include <__utility/move.h> @@ -224,7 +241,6 @@ namespace std { #include #include #include -#include #include // standard-mandated includes @@ -1815,6 +1831,7 @@ _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include # include #endif diff --git a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/cpp20_iter_concepts.pass.cpp b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/cpp20_iter_concepts.pass.cpp index 17ac69b65561..5eddf794d0c1 100644 --- a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/cpp20_iter_concepts.pass.cpp +++ b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/cpp20_iter_concepts.pass.cpp @@ -19,9 +19,13 @@ // random_access_iterator_tag. // (1.4) -- Otherwise, ITER_CONCEPT(I) does not denote a type. +// ADDITIONAL_COMPILE_FLAGS: -Wno-private-header + #include "test_macros.h" +#include <__type_traits/is_valid_expansion.h> #include + struct OtherTag : std::input_iterator_tag {}; struct OtherTagTwo : std::output_iterator_tag {}; diff --git a/libcxx/test/libcxx/transitive_includes/cxx2b.csv b/libcxx/test/libcxx/transitive_includes/cxx2b.csv index 61706cd1e4c1..b20017730a99 100644 --- a/libcxx/test/libcxx/transitive_includes/cxx2b.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx2b.csv @@ -305,7 +305,6 @@ fstream istream fstream mutex fstream ostream fstream string -fstream type_traits fstream typeinfo fstream version functional array @@ -367,7 +366,6 @@ iterator cstdlib iterator initializer_list iterator iosfwd iterator limits -iterator type_traits iterator variant iterator version latch atomic @@ -401,7 +399,6 @@ locale mutex locale new locale streambuf locale string -locale type_traits locale version map compare map cstddef @@ -655,7 +652,6 @@ thread type_traits thread version tuple compare tuple cstddef -tuple type_traits tuple version type_traits cstddef type_traits cstdint @@ -721,7 +717,6 @@ variant initializer_list variant limits variant new variant tuple -variant type_traits variant version vector climits vector compare diff --git a/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.readable/indirectly_readable.compile.pass.cpp b/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.readable/indirectly_readable.compile.pass.cpp index d42014b2430d..e06234477e29 100644 --- a/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.readable/indirectly_readable.compile.pass.cpp +++ b/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.readable/indirectly_readable.compile.pass.cpp @@ -11,9 +11,9 @@ // template // concept indirectly_readable; -#include - #include +#include +#include #include "read_write.h" diff --git a/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.readable/iter_common_reference_t.compile.pass.cpp b/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.readable/iter_common_reference_t.compile.pass.cpp index a173caddd4b2..e6302e3dfdcc 100644 --- a/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.readable/iter_common_reference_t.compile.pass.cpp +++ b/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.readable/iter_common_reference_t.compile.pass.cpp @@ -10,9 +10,9 @@ // iter_common_reference_t -#include - #include +#include +#include struct X { }; diff --git a/libcxx/test/std/iterators/predef.iterators/iterators.common/ctor.converting.pass.cpp b/libcxx/test/std/iterators/predef.iterators/iterators.common/ctor.converting.pass.cpp index 97c9d40febce..741654ea640c 100644 --- a/libcxx/test/std/iterators/predef.iterators/iterators.common/ctor.converting.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/iterators.common/ctor.converting.pass.cpp @@ -12,10 +12,9 @@ // requires convertible_to && convertible_to // constexpr common_iterator(const common_iterator& x); -#include #include - -#include "test_macros.h" +#include +#include constexpr bool test() { diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.sentinel/assign.converting.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.sentinel/assign.converting.pass.cpp index 57f9ad70b7ad..aa81390e1ec0 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.sentinel/assign.converting.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.sentinel/assign.converting.pass.cpp @@ -16,9 +16,10 @@ // requires assignable_from // constexpr move_sentinel& operator=(const move_sentinel& s); -#include #include #include +#include +#include struct NonAssignable { NonAssignable& operator=(int i); diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.sentinel/ctor.converting.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.sentinel/ctor.converting.pass.cpp index 5f5be0c7f159..21271b191fdc 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.sentinel/ctor.converting.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.sentinel/ctor.converting.pass.cpp @@ -16,9 +16,10 @@ // requires convertible_to // constexpr move_sentinel(const move_sentinel& s); -#include #include #include +#include +#include struct NonConvertible { explicit NonConvertible(); diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.sentinel/ctor.sentinel.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.sentinel/ctor.sentinel.pass.cpp index 1fc2843f465a..425b3bdfd19c 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.sentinel/ctor.sentinel.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.sentinel/ctor.sentinel.pass.cpp @@ -14,8 +14,9 @@ // constexpr explicit move_sentinel(S s); -#include #include +#include +#include constexpr bool test() { diff --git a/libcxx/test/std/library/description/conventions/expos.only.func/synth_three_way.pass.cpp b/libcxx/test/std/library/description/conventions/expos.only.func/synth_three_way.pass.cpp index d9a6706b3b68..158ea46ff2c0 100644 --- a/libcxx/test/std/library/description/conventions/expos.only.func/synth_three_way.pass.cpp +++ b/libcxx/test/std/library/description/conventions/expos.only.func/synth_three_way.pass.cpp @@ -21,6 +21,7 @@ TEST_MSVC_DIAGNOSTIC_IGNORED(4242 4244) // Various truncation warnings #include #include // quiet_NaN #include +#include #include // declval template diff --git a/libcxx/test/std/utilities/tuple/tuple.general/ignore.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.general/ignore.pass.cpp index ef819e2031e3..769c55e10fc4 100644 --- a/libcxx/test/std/utilities/tuple/tuple.general/ignore.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.general/ignore.pass.cpp @@ -12,8 +12,9 @@ // UNSUPPORTED: c++03 -#include #include +#include +#include #include "test_macros.h" diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp index 648f8bfaffb1..a2d1170da826 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp @@ -17,9 +17,10 @@ // // See https://llvm.org/PR22806. -#include -#include #include +#include +#include +#include #include "test_macros.h" diff --git a/libcxx/test/support/min_allocator.h b/libcxx/test/support/min_allocator.h index 529c29115f2d..f27ac80c0464 100644 --- a/libcxx/test/support/min_allocator.h +++ b/libcxx/test/support/min_allocator.h @@ -9,14 +9,14 @@ #ifndef MIN_ALLOCATOR_H #define MIN_ALLOCATOR_H -#include -#include -#include #include #include +#include +#include #include #include #include +#include #include "test_macros.h"