[libcxx-commits] [libcxx] 60a6a0d - [libc++] Add missing includes

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jul 3 06:40:49 PDT 2023


Author: Louis Dionne
Date: 2023-07-03T09:40:09-04:00
New Revision: 60a6a0d17ad5afcac5c71dcf9a05f8c814951804

URL: https://github.com/llvm/llvm-project/commit/60a6a0d17ad5afcac5c71dcf9a05f8c814951804
DIFF: https://github.com/llvm/llvm-project/commit/60a6a0d17ad5afcac5c71dcf9a05f8c814951804.diff

LOG: [libc++] Add missing includes

Those were found while trying to enable configurations like no-threads
and no-localization with Clang modules enabled.

Differential Revision: https://reviews.llvm.org/D153977

Added: 
    

Modified: 
    libcxx/include/__algorithm/pstl_any_all_none_of.h
    libcxx/include/__algorithm/pstl_copy.h
    libcxx/include/__algorithm/pstl_count.h
    libcxx/include/__algorithm/pstl_fill.h
    libcxx/include/__algorithm/pstl_find.h
    libcxx/include/__algorithm/pstl_for_each.h
    libcxx/include/__algorithm/pstl_generate.h
    libcxx/include/__algorithm/pstl_is_partitioned.h
    libcxx/include/__algorithm/pstl_merge.h
    libcxx/include/__algorithm/pstl_replace.h
    libcxx/include/__algorithm/pstl_stable_sort.h
    libcxx/include/__algorithm/pstl_transform.h
    libcxx/include/__locale
    libcxx/include/regex
    libcxx/test/libcxx/transitive_includes/cxx23.csv
    libcxx/test/libcxx/transitive_includes/cxx26.csv
    libcxx/test/std/containers/sequences/vector.bool/vector.bool.fmt/format.pass.cpp
    libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp
    libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp
    libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
    libcxx/test/std/ranges/range.factories/range.istream.view/cpo.pass.cpp
    libcxx/test/std/ranges/range.factories/range.istream.view/iterator/ctor.pass.cpp
    libcxx/test/std/ranges/range.factories/range.istream.view/iterator/special_op.pass.cpp
    libcxx/test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp
    libcxx/test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp
    libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.pass.cpp
    libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
    libcxx/test/std/utilities/format/types.compile.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__algorithm/pstl_any_all_none_of.h b/libcxx/include/__algorithm/pstl_any_all_none_of.h
index c6febf4ec2784f..0e50e0ed3662fc 100644
--- a/libcxx/include/__algorithm/pstl_any_all_none_of.h
+++ b/libcxx/include/__algorithm/pstl_any_all_none_of.h
@@ -17,6 +17,7 @@
 #include <__type_traits/enable_if.h>
 #include <__type_traits/is_execution_policy.h>
 #include <__type_traits/remove_cvref.h>
+#include <__utility/move.h>
 #include <__utility/terminate_on_exception.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

diff  --git a/libcxx/include/__algorithm/pstl_copy.h b/libcxx/include/__algorithm/pstl_copy.h
index 5b7d921d7199b0..83c712c35407f2 100644
--- a/libcxx/include/__algorithm/pstl_copy.h
+++ b/libcxx/include/__algorithm/pstl_copy.h
@@ -14,9 +14,11 @@
 #include <__config>
 #include <__functional/identity.h>
 #include <__iterator/iterator_traits.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_constant_evaluated.h>
 #include <__type_traits/is_execution_policy.h>
 #include <__type_traits/is_trivially_copyable.h>
+#include <__type_traits/remove_cvref.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header

diff  --git a/libcxx/include/__algorithm/pstl_count.h b/libcxx/include/__algorithm/pstl_count.h
index 7f591c99915ca7..15acb85de0bff6 100644
--- a/libcxx/include/__algorithm/pstl_count.h
+++ b/libcxx/include/__algorithm/pstl_count.h
@@ -16,10 +16,13 @@
 #include <__algorithm/pstl_frontend_dispatch.h>
 #include <__atomic/atomic.h>
 #include <__config>
+#include <__functional/operations.h>
 #include <__iterator/iterator_traits.h>
 #include <__numeric/pstl_transform_reduce.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_execution_policy.h>
 #include <__type_traits/remove_cvref.h>
+#include <__utility/move.h>
 #include <__utility/terminate_on_exception.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

diff  --git a/libcxx/include/__algorithm/pstl_fill.h b/libcxx/include/__algorithm/pstl_fill.h
index ef608ce9f7b5bc..d64c828d90468b 100644
--- a/libcxx/include/__algorithm/pstl_fill.h
+++ b/libcxx/include/__algorithm/pstl_fill.h
@@ -15,8 +15,10 @@
 #include <__config>
 #include <__iterator/cpp17_iterator_concepts.h>
 #include <__iterator/iterator_traits.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_execution_policy.h>
 #include <__type_traits/remove_cvref.h>
+#include <__utility/move.h>
 #include <__utility/terminate_on_exception.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

diff  --git a/libcxx/include/__algorithm/pstl_find.h b/libcxx/include/__algorithm/pstl_find.h
index 08f72c50e98630..8e8adfecfa46c2 100644
--- a/libcxx/include/__algorithm/pstl_find.h
+++ b/libcxx/include/__algorithm/pstl_find.h
@@ -16,8 +16,10 @@
 #include <__config>
 #include <__iterator/cpp17_iterator_concepts.h>
 #include <__iterator/iterator_traits.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_execution_policy.h>
 #include <__type_traits/remove_cvref.h>
+#include <__utility/move.h>
 #include <__utility/terminate_on_exception.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

diff  --git a/libcxx/include/__algorithm/pstl_for_each.h b/libcxx/include/__algorithm/pstl_for_each.h
index a4a99147330130..09efc24950dbf3 100644
--- a/libcxx/include/__algorithm/pstl_for_each.h
+++ b/libcxx/include/__algorithm/pstl_for_each.h
@@ -16,9 +16,11 @@
 #include <__config>
 #include <__iterator/cpp17_iterator_concepts.h>
 #include <__iterator/iterator_traits.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_execution_policy.h>
 #include <__type_traits/remove_cvref.h>
 #include <__type_traits/void_t.h>
+#include <__utility/move.h>
 #include <__utility/terminate_on_exception.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

diff  --git a/libcxx/include/__algorithm/pstl_generate.h b/libcxx/include/__algorithm/pstl_generate.h
index 4ad4105fe72e16..e1ba0183dcba38 100644
--- a/libcxx/include/__algorithm/pstl_generate.h
+++ b/libcxx/include/__algorithm/pstl_generate.h
@@ -14,8 +14,10 @@
 #include <__algorithm/pstl_frontend_dispatch.h>
 #include <__config>
 #include <__iterator/cpp17_iterator_concepts.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_execution_policy.h>
 #include <__type_traits/remove_cvref.h>
+#include <__utility/move.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header

diff  --git a/libcxx/include/__algorithm/pstl_is_partitioned.h b/libcxx/include/__algorithm/pstl_is_partitioned.h
index 70f0df162bd471..6f6e9b2f4478f9 100644
--- a/libcxx/include/__algorithm/pstl_is_partitioned.h
+++ b/libcxx/include/__algorithm/pstl_is_partitioned.h
@@ -14,8 +14,10 @@
 #include <__algorithm/pstl_find.h>
 #include <__algorithm/pstl_frontend_dispatch.h>
 #include <__config>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_execution_policy.h>
 #include <__type_traits/remove_cvref.h>
+#include <__utility/move.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header

diff  --git a/libcxx/include/__algorithm/pstl_merge.h b/libcxx/include/__algorithm/pstl_merge.h
index b5585eeec83d6c..f10ac767428287 100644
--- a/libcxx/include/__algorithm/pstl_merge.h
+++ b/libcxx/include/__algorithm/pstl_merge.h
@@ -12,8 +12,10 @@
 #include <__algorithm/pstl_backend.h>
 #include <__config>
 #include <__functional/operations.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_execution_policy.h>
 #include <__type_traits/remove_cvref.h>
+#include <__utility/move.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header

diff  --git a/libcxx/include/__algorithm/pstl_replace.h b/libcxx/include/__algorithm/pstl_replace.h
index 9f8a44beef9c8a..e5a1068fc59bad 100644
--- a/libcxx/include/__algorithm/pstl_replace.h
+++ b/libcxx/include/__algorithm/pstl_replace.h
@@ -13,6 +13,10 @@
 #include <__algorithm/pstl_for_each.h>
 #include <__algorithm/pstl_frontend_dispatch.h>
 #include <__config>
+#include <__iterator/iterator_traits.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/remove_cvref.h>
+#include <__utility/move.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header

diff  --git a/libcxx/include/__algorithm/pstl_stable_sort.h b/libcxx/include/__algorithm/pstl_stable_sort.h
index cdb257150112a8..510ffd862980dc 100644
--- a/libcxx/include/__algorithm/pstl_stable_sort.h
+++ b/libcxx/include/__algorithm/pstl_stable_sort.h
@@ -12,8 +12,10 @@
 #include <__algorithm/pstl_backend.h>
 #include <__config>
 #include <__functional/operations.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_execution_policy.h>
 #include <__type_traits/remove_cvref.h>
+#include <__utility/move.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header

diff  --git a/libcxx/include/__algorithm/pstl_transform.h b/libcxx/include/__algorithm/pstl_transform.h
index aa7d49b75ea3ea..27d95349fc8be9 100644
--- a/libcxx/include/__algorithm/pstl_transform.h
+++ b/libcxx/include/__algorithm/pstl_transform.h
@@ -13,7 +13,10 @@
 #include <__config>
 #include <__iterator/cpp17_iterator_concepts.h>
 #include <__iterator/iterator_traits.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_execution_policy.h>
+#include <__type_traits/remove_cvref.h>
+#include <__utility/move.h>
 #include <__utility/terminate_on_exception.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

diff  --git a/libcxx/include/__locale b/libcxx/include/__locale
index c138510f97f4fd..5c060ab04c7688 100644
--- a/libcxx/include/__locale
+++ b/libcxx/include/__locale
@@ -12,6 +12,7 @@
 
 #include <__availability>
 #include <__config>
+#include <__memory/shared_ptr.h> // __shared_count
 #include <__type_traits/make_unsigned.h>
 #include <cctype>
 #include <clocale>

diff  --git a/libcxx/include/regex b/libcxx/include/regex
index fd364cbf5e7a83..be1bce10ebd19e 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -796,6 +796,7 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
 #include <__iterator/default_sentinel.h>
 #include <__iterator/wrap_iter.h>
 #include <__locale>
+#include <__memory/shared_ptr.h>
 #include <__memory_resource/polymorphic_allocator.h>
 #include <__type_traits/is_swappable.h>
 #include <__utility/move.h>

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx23.csv b/libcxx/test/libcxx/transitive_includes/cxx23.csv
index c1c24a9687392f..05de55e81f63ee 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx23.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx23.csv
@@ -94,8 +94,14 @@ codecvt cstdint
 codecvt cstdlib
 codecvt cstring
 codecvt cwchar
+codecvt initializer_list
+codecvt iosfwd
+codecvt limits
 codecvt mutex
+codecvt new
+codecvt stdexcept
 codecvt string
+codecvt typeinfo
 codecvt version
 compare cmath
 compare cstddef
@@ -240,9 +246,13 @@ fstream cstring
 fstream cwchar
 fstream filesystem
 fstream initializer_list
+fstream iosfwd
 fstream istream
+fstream limits
 fstream mutex
+fstream new
 fstream ostream
+fstream stdexcept
 fstream string
 fstream typeinfo
 fstream version
@@ -287,9 +297,14 @@ ios cstdint
 ios cstdlib
 ios cstring
 ios cwchar
+ios initializer_list
 ios iosfwd
+ios limits
 ios mutex
+ios new
+ios stdexcept
 ios string
+ios typeinfo
 ios version
 iosfwd version
 iostream ios
@@ -344,8 +359,10 @@ locale iosfwd
 locale limits
 locale mutex
 locale new
+locale stdexcept
 locale streambuf
 locale string
+locale typeinfo
 locale version
 map compare
 map cstddef
@@ -482,10 +499,13 @@ regex cstring
 regex cwchar
 regex deque
 regex initializer_list
+regex iosfwd
 regex limits
 regex mutex
+regex new
 regex stdexcept
 regex string
+regex typeinfo
 regex vector
 regex version
 scoped_allocator cstddef

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx26.csv b/libcxx/test/libcxx/transitive_includes/cxx26.csv
index c1c24a9687392f..05de55e81f63ee 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx26.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx26.csv
@@ -94,8 +94,14 @@ codecvt cstdint
 codecvt cstdlib
 codecvt cstring
 codecvt cwchar
+codecvt initializer_list
+codecvt iosfwd
+codecvt limits
 codecvt mutex
+codecvt new
+codecvt stdexcept
 codecvt string
+codecvt typeinfo
 codecvt version
 compare cmath
 compare cstddef
@@ -240,9 +246,13 @@ fstream cstring
 fstream cwchar
 fstream filesystem
 fstream initializer_list
+fstream iosfwd
 fstream istream
+fstream limits
 fstream mutex
+fstream new
 fstream ostream
+fstream stdexcept
 fstream string
 fstream typeinfo
 fstream version
@@ -287,9 +297,14 @@ ios cstdint
 ios cstdlib
 ios cstring
 ios cwchar
+ios initializer_list
 ios iosfwd
+ios limits
 ios mutex
+ios new
+ios stdexcept
 ios string
+ios typeinfo
 ios version
 iosfwd version
 iostream ios
@@ -344,8 +359,10 @@ locale iosfwd
 locale limits
 locale mutex
 locale new
+locale stdexcept
 locale streambuf
 locale string
+locale typeinfo
 locale version
 map compare
 map cstddef
@@ -482,10 +499,13 @@ regex cstring
 regex cwchar
 regex deque
 regex initializer_list
+regex iosfwd
 regex limits
 regex mutex
+regex new
 regex stdexcept
 regex string
+regex typeinfo
 regex vector
 regex version
 scoped_allocator cstddef

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/vector.bool.fmt/format.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/vector.bool.fmt/format.pass.cpp
index 51cd45834343c5..08233741acf251 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/vector.bool.fmt/format.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/vector.bool.fmt/format.pass.cpp
@@ -25,6 +25,7 @@
 #include <cassert>
 #include <concepts>
 #include <format>
+#include <iterator>
 #include <vector>
 
 #include "test_format_context.h"

diff  --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp
index dccef75c02056c..cfbb8419fe1c5b 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp
@@ -20,9 +20,10 @@
 // explicit basic_ifstream(const filesystem::path& s,
 //     ios_base::openmode mode = ios_base::in);
 
-#include <fstream>
-#include <filesystem>
 #include <cassert>
+#include <filesystem>
+#include <fstream>
+#include <type_traits>
 
 #include "test_macros.h"
 

diff  --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp
index 7e31e294f44ce3..316ed776a48b54 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp
@@ -17,11 +17,13 @@
 
 // explicit basic_ofstream(const filesystem::path& s, ios_base::openmode mode = ios_base::out);
 
-#include <fstream>
-#include <filesystem>
 #include <cassert>
-#include "test_macros.h"
+#include <filesystem>
+#include <fstream>
+#include <type_traits>
+
 #include "platform_support.h"
+#include "test_macros.h"
 
 namespace fs = std::filesystem;
 

diff  --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp
index ed222480c84aba..9e7fa946559272 100644
--- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp
+++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp
@@ -12,10 +12,11 @@
 
 // explicit failure(const string& msg, const error_code& ec = io_errc::stream);
 
+#include <cassert>
 #include <ios>
 #include <string>
 #include <system_error>
-#include <cassert>
+#include <type_traits>
 
 #include "test_macros.h"
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp
index 4125869bfa3b84..d3117d3ef6d065 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp
@@ -21,9 +21,10 @@
 
 // XFAIL: no-wide-characters
 
-#include <locale>
-#include <codecvt>
 #include <cassert>
+#include <codecvt>
+#include <locale>
+#include <type_traits>
 
 #include "test_macros.h"
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
index f9e5ee3cd68a39..3f74bbfa37d8d1 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
@@ -17,9 +17,10 @@
 
 // XFAIL: no-wide-characters
 
-#include <locale>
-#include <codecvt>
 #include <cassert>
+#include <codecvt>
+#include <locale>
+#include <type_traits>
 
 #include "test_macros.h"
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.istream.view/cpo.pass.cpp b/libcxx/test/std/ranges/range.factories/range.istream.view/cpo.pass.cpp
index 1cbbccfdbe43e4..bbca4a3d6f9ee3 100644
--- a/libcxx/test/std/ranges/range.factories/range.istream.view/cpo.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.istream.view/cpo.pass.cpp
@@ -14,6 +14,7 @@
 #include <cassert>
 #include <ranges>
 #include <sstream>
+#include <type_traits>
 
 #include "test_macros.h"
 #include "utils.h"

diff  --git a/libcxx/test/std/ranges/range.factories/range.istream.view/iterator/ctor.pass.cpp b/libcxx/test/std/ranges/range.factories/range.istream.view/iterator/ctor.pass.cpp
index 017d11c3e65887..e180d12924084b 100644
--- a/libcxx/test/std/ranges/range.factories/range.istream.view/iterator/ctor.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.istream.view/iterator/ctor.pass.cpp
@@ -14,6 +14,7 @@
 #include <cassert>
 #include <ranges>
 #include <sstream>
+#include <type_traits>
 
 #include "test_macros.h"
 #include "../utils.h"

diff  --git a/libcxx/test/std/ranges/range.factories/range.istream.view/iterator/special_op.pass.cpp b/libcxx/test/std/ranges/range.factories/range.istream.view/iterator/special_op.pass.cpp
index edcf6ebe8f82a9..fb6d31be941269 100644
--- a/libcxx/test/std/ranges/range.factories/range.istream.view/iterator/special_op.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.istream.view/iterator/special_op.pass.cpp
@@ -17,6 +17,7 @@
 #include <cassert>
 #include <ranges>
 #include <sstream>
+#include <type_traits>
 
 #include "test_macros.h"
 #include "../utils.h"

diff  --git a/libcxx/test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp
index d228be0cc0ef20..21717cfd1f7ba9 100644
--- a/libcxx/test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp
+++ b/libcxx/test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp
@@ -15,8 +15,9 @@
 //    assign(InputIterator first, InputIterator last,
 //           flag_type f = regex_constants::ECMAScript);
 
-#include <regex>
 #include <cassert>
+#include <regex>
+#include <string>
 
 #include "test_macros.h"
 #include "test_iterators.h"

diff  --git a/libcxx/test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp
index 4b1bcef9a6b3b3..4f09e3d6e42695 100644
--- a/libcxx/test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp
+++ b/libcxx/test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp
@@ -14,8 +14,10 @@
 //   basic_regex& assign(const basic_string<charT, string_traits, A>& s,
 //                       flag_type f = regex_constants::ECMAScript);
 
-#include <regex>
 #include <cassert>
+#include <regex>
+#include <string>
+
 #include "test_macros.h"
 
 int main(int, char**)

diff  --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.pass.cpp
index 43d4063d2d4162..575e5dda93f53c 100644
--- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.pass.cpp
+++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.pass.cpp
@@ -24,6 +24,7 @@
 
 #include <cassert>
 #include <concepts>
+#include <iterator>
 #include <thread>
 
 #include "test_format_context.h"

diff  --git a/libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp b/libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
index c17caa7baf83d8..eadf10c95de994 100644
--- a/libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
@@ -33,6 +33,7 @@
 #include <set>
 #include <span>
 #include <stack>
+#include <system_error>
 #include <tuple>
 #include <type_traits>
 #include <unordered_map>

diff  --git a/libcxx/test/std/utilities/format/types.compile.pass.cpp b/libcxx/test/std/utilities/format/types.compile.pass.cpp
index e16b087c189934..93723ddba6ce4e 100644
--- a/libcxx/test/std/utilities/format/types.compile.pass.cpp
+++ b/libcxx/test/std/utilities/format/types.compile.pass.cpp
@@ -57,7 +57,12 @@
 // including the <format> header.
 
 #include <concepts>
+#include <cstddef>
 #include <format>
+#include <string_view>
+#include <string>
+#include <tuple>
+#include <utility>
 
 #include "test_macros.h"
 
@@ -87,7 +92,7 @@ static_assert(std::semiregular<std::formatter<float, char>>);
 static_assert(std::semiregular<std::formatter<double, char>>);
 static_assert(std::semiregular<std::formatter<long double, char>>);
 
-static_assert(std::semiregular<std::formatter<nullptr_t, char>>);
+static_assert(std::semiregular<std::formatter<std::nullptr_t, char>>);
 static_assert(std::semiregular<std::formatter<void*, char>>);
 static_assert(std::semiregular<std::formatter<const void*, char>>);
 
@@ -125,7 +130,7 @@ static_assert(std::semiregular<std::formatter<float, wchar_t>>);
 static_assert(std::semiregular<std::formatter<double, wchar_t>>);
 static_assert(std::semiregular<std::formatter<long double, wchar_t>>);
 
-static_assert(std::semiregular<std::formatter<nullptr_t, wchar_t>>);
+static_assert(std::semiregular<std::formatter<std::nullptr_t, wchar_t>>);
 static_assert(std::semiregular<std::formatter<void*, wchar_t>>);
 static_assert(std::semiregular<std::formatter<const void*, wchar_t>>);
 


        


More information about the libcxx-commits mailing list