[libcxx-commits] [libcxx] 285e1e2 - [libc++][format] Removes unneeded includes.
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jul 8 03:39:44 PDT 2023
Author: Mark de Wever
Date: 2023-07-08T12:39:33+02:00
New Revision: 285e1e2a00204f44653f1f93757232882fa0b4f7
URL: https://github.com/llvm/llvm-project/commit/285e1e2a00204f44653f1f93757232882fa0b4f7
DIFF: https://github.com/llvm/llvm-project/commit/285e1e2a00204f44653f1f93757232882fa0b4f7.diff
LOG: [libc++][format] Removes unneeded includes.
I did a manual review after the post-review comments in D149543
Reviewed By: #libc, philnik, ldionne
Differential Revision: https://reviews.llvm.org/D154122
Added:
Modified:
libcxx/include/__chrono/formatter.h
libcxx/include/__format/container_adaptor.h
libcxx/include/__format/format_arg.h
libcxx/include/__format/format_arg_store.h
libcxx/include/__format/format_functions.h
libcxx/include/__format/formatter_bool.h
libcxx/include/__format/formatter_string.h
libcxx/include/__format/formatter_tuple.h
libcxx/include/__format/parser_std_format_spec.h
libcxx/include/__format/range_default_formatter.h
libcxx/include/__format/range_formatter.h
libcxx/include/__format/unicode.h
Removed:
################################################################################
diff --git a/libcxx/include/__chrono/formatter.h b/libcxx/include/__chrono/formatter.h
index 679edf39cbb39f..8274b0c05d4b34 100644
--- a/libcxx/include/__chrono/formatter.h
+++ b/libcxx/include/__chrono/formatter.h
@@ -44,7 +44,6 @@
#include <cmath>
#include <ctime>
#include <sstream>
-#include <string>
#include <string_view>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__format/container_adaptor.h b/libcxx/include/__format/container_adaptor.h
index 5b95f600f0cdca..ec806ef16bf528 100644
--- a/libcxx/include/__format/container_adaptor.h
+++ b/libcxx/include/__format/container_adaptor.h
@@ -14,12 +14,10 @@
# pragma GCC system_header
#endif
-#include <__availability>
#include <__config>
#include <__format/concepts.h>
#include <__format/formatter.h>
#include <__format/range_default_formatter.h>
-#include <__ranges/all.h>
#include <__ranges/ref_view.h>
#include <__type_traits/is_const.h>
#include <__type_traits/maybe_const.h>
diff --git a/libcxx/include/__format/format_arg.h b/libcxx/include/__format/format_arg.h
index e544450abf6121..5cbfe812341bdd 100644
--- a/libcxx/include/__format/format_arg.h
+++ b/libcxx/include/__format/format_arg.h
@@ -14,18 +14,16 @@
#include <__concepts/arithmetic.h>
#include <__config>
#include <__format/concepts.h>
-#include <__format/format_error.h>
#include <__format/format_fwd.h>
#include <__format/format_parse_context.h>
#include <__functional/invoke.h>
#include <__memory/addressof.h>
#include <__type_traits/conditional.h>
-#include <__type_traits/is_const.h>
-#include <__utility/declval.h>
#include <__utility/forward.h>
+#include <__utility/move.h>
#include <__utility/unreachable.h>
#include <__variant/monostate.h>
-#include <string>
+#include <cstdint>
#include <string_view>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__format/format_arg_store.h b/libcxx/include/__format/format_arg_store.h
index afba6c32fccdb1..15ec8eb0a7d838 100644
--- a/libcxx/include/__format/format_arg_store.h
+++ b/libcxx/include/__format/format_arg_store.h
@@ -21,9 +21,7 @@
#include <__format/format_arg.h>
#include <__type_traits/conditional.h>
#include <__type_traits/extent.h>
-#include <__type_traits/is_same.h>
#include <__type_traits/remove_const.h>
-#include <__utility/forward.h>
#include <string>
#include <string_view>
diff --git a/libcxx/include/__format/format_functions.h b/libcxx/include/__format/format_functions.h
index 1ffdb31c4e296f..0ae110118f6b79 100644
--- a/libcxx/include/__format/format_functions.h
+++ b/libcxx/include/__format/format_functions.h
@@ -11,7 +11,6 @@
#define _LIBCPP___FORMAT_FORMAT_FUNCTIONS
#include <__algorithm/clamp.h>
-#include <__availability>
#include <__concepts/convertible_to.h>
#include <__concepts/same_as.h>
#include <__config>
@@ -38,7 +37,6 @@
#include <__iterator/iterator_traits.h> // iter_value_t
#include <__variant/monostate.h>
#include <array>
-#include <string>
#include <string_view>
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
diff --git a/libcxx/include/__format/formatter_bool.h b/libcxx/include/__format/formatter_bool.h
index 1eb74650e330f7..606d5c5c27af8b 100644
--- a/libcxx/include/__format/formatter_bool.h
+++ b/libcxx/include/__format/formatter_bool.h
@@ -14,13 +14,11 @@
#include <__availability>
#include <__config>
#include <__format/concepts.h>
-#include <__format/format_error.h>
#include <__format/format_parse_context.h>
#include <__format/formatter.h>
#include <__format/formatter_integral.h>
#include <__format/parser_std_format_spec.h>
#include <__utility/unreachable.h>
-#include <string_view>
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
# include <locale>
diff --git a/libcxx/include/__format/formatter_string.h b/libcxx/include/__format/formatter_string.h
index bfda5c3da67548..0894e46fbd1872 100644
--- a/libcxx/include/__format/formatter_string.h
+++ b/libcxx/include/__format/formatter_string.h
@@ -17,7 +17,6 @@
#include <__format/formatter.h>
#include <__format/formatter_output.h>
#include <__format/parser_std_format_spec.h>
-#include <__utility/move.h>
#include <string>
#include <string_view>
diff --git a/libcxx/include/__format/formatter_tuple.h b/libcxx/include/__format/formatter_tuple.h
index 92380f858fee60..18d41d32c6b92c 100644
--- a/libcxx/include/__format/formatter_tuple.h
+++ b/libcxx/include/__format/formatter_tuple.h
@@ -11,19 +11,16 @@
#define _LIBCPP___FORMAT_FORMATTER_TUPLE_H
#include <__algorithm/ranges_copy.h>
-#include <__availability>
#include <__chrono/statically_widen.h>
#include <__config>
#include <__format/buffer.h>
#include <__format/concepts.h>
-#include <__format/format_args.h>
#include <__format/format_context.h>
#include <__format/format_error.h>
#include <__format/format_parse_context.h>
#include <__format/formatter.h>
#include <__format/formatter_output.h>
#include <__format/parser_std_format_spec.h>
-#include <__iterator/back_insert_iterator.h>
#include <__type_traits/remove_cvref.h>
#include <__utility/integer_sequence.h>
#include <__utility/pair.h>
diff --git a/libcxx/include/__format/parser_std_format_spec.h b/libcxx/include/__format/parser_std_format_spec.h
index 30fecffb00de0d..2f7ccdf2a8ebac 100644
--- a/libcxx/include/__format/parser_std_format_spec.h
+++ b/libcxx/include/__format/parser_std_format_spec.h
@@ -17,7 +17,6 @@
/// affect the std-format-spec.
#include <__algorithm/copy_n.h>
-#include <__algorithm/find_if.h>
#include <__algorithm/min.h>
#include <__assert>
#include <__concepts/arithmetic.h>
diff --git a/libcxx/include/__format/range_default_formatter.h b/libcxx/include/__format/range_default_formatter.h
index 3954f98c967e64..676526c9c6c499 100644
--- a/libcxx/include/__format/range_default_formatter.h
+++ b/libcxx/include/__format/range_default_formatter.h
@@ -15,7 +15,6 @@
#endif
#include <__algorithm/ranges_copy.h>
-#include <__availability>
#include <__chrono/statically_widen.h>
#include <__concepts/same_as.h>
#include <__config>
@@ -26,10 +25,10 @@
#include <__ranges/concepts.h>
#include <__ranges/data.h>
#include <__ranges/size.h>
+#include <__type_traits/conditional.h>
#include <__type_traits/remove_cvref.h>
#include <__utility/pair.h>
#include <string_view>
-#include <tuple>
_LIBCPP_BEGIN_NAMESPACE_STD
diff --git a/libcxx/include/__format/range_formatter.h b/libcxx/include/__format/range_formatter.h
index 2c8f5c1fa5d3c8..ca3ee9a0a9739f 100644
--- a/libcxx/include/__format/range_formatter.h
+++ b/libcxx/include/__format/range_formatter.h
@@ -15,13 +15,11 @@
#endif
#include <__algorithm/ranges_copy.h>
-#include <__availability>
#include <__chrono/statically_widen.h>
#include <__concepts/same_as.h>
#include <__config>
#include <__format/buffer.h>
#include <__format/concepts.h>
-#include <__format/format_args.h>
#include <__format/format_context.h>
#include <__format/format_error.h>
#include <__format/formatter.h>
diff --git a/libcxx/include/__format/unicode.h b/libcxx/include/__format/unicode.h
index 5a748fa7ab050d..8666f80c78a288 100644
--- a/libcxx/include/__format/unicode.h
+++ b/libcxx/include/__format/unicode.h
@@ -16,9 +16,7 @@
#include <__config>
#include <__format/extended_grapheme_cluster_table.h>
#include <__iterator/concepts.h>
-#include <__iterator/iterator_traits.h> // iter_value_t
-#include <__type_traits/make_unsigned.h>
-#include <__utility/unreachable.h>
+#include <__iterator/readable_traits.h> // iter_value_t
#include <string_view>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
More information about the libcxx-commits
mailing list