[libcxx-commits] [libcxx] [libc++] Reduce the amount of formatter code included in <vector> (PR #178683)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 29 07:50:56 PST 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions ,h -- libcxx/include/__format/formatter_bool_impl.h libcxx/include/__format/format_functions.h libcxx/include/__vector/vector_bool_formatter.h libcxx/include/format libcxx/include/__format/formatter_bool_decl.h --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/include/__format/formatter_bool_impl.h b/libcxx/include/__format/formatter_bool_impl.h
index abb8d3c8b..c5163b679 100644
--- a/libcxx/include/__format/formatter_bool_impl.h
+++ b/libcxx/include/__format/formatter_bool_impl.h
@@ -28,8 +28,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <__fmt_char_type _CharT>
 template <class _FormatContext>
-_LIBCPP_HIDE_FROM_ABI
-typename _FormatContext::iterator formatter<bool, _CharT>::format(bool __value, _FormatContext& __ctx) const {
+_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
+formatter<bool, _CharT>::format(bool __value, _FormatContext& __ctx) const {
   switch (__parser_.__type_) {
   case __format_spec::__type::__default:
   case __format_spec::__type::__string:
@@ -54,6 +54,6 @@ typename _FormatContext::iterator formatter<bool, _CharT>::format(bool __value,
 
 _LIBCPP_END_NAMESPACE_STD
 
-#endif   // _LIBCPP_STD_VER >= 20
+#endif // _LIBCPP_STD_VER >= 20
 
 #endif // _LIBCPP___FORMAT_FORMATTER_BOOL_IMPL_H

``````````

</details>


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


More information about the libcxx-commits mailing list