[libcxx-commits] [libcxx] Reapply "[libc++] Optimize num_put integral functions" (#131613) (PR #133572)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Mar 29 01:10:56 PDT 2025
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 HEAD~1 HEAD --extensions h,,cpp -- libcxx/test/benchmarks/locale/num_put.bench.cpp libcxx/include/__charconv/tables.h libcxx/include/__charconv/to_chars_base_10.h libcxx/include/__charconv/to_chars_integral.h libcxx/include/__charconv/to_chars_result.h libcxx/include/__charconv/traits.h libcxx/include/__format/formatter_floating_point.h libcxx/include/__format/formatter_integral.h libcxx/include/__format/formatter_output.h libcxx/include/locale libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_long.pass.cpp libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long_long.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/locale b/libcxx/include/locale
index 1105faed8..4a8317fe0 100644
--- a/libcxx/include/locale
+++ b/libcxx/include/locale
@@ -1287,7 +1287,7 @@ _LIBCPP_HIDE_FROM_ABI inline _OutputIterator num_put<_CharT, _OutputIterator>::_
__basefield != ios_base::hex && __v >= 0)
*__buffer_ptr++ = '+';
- // Add base prefix
+ // Add base prefix
if (__v != 0 && __flags & ios_base::showbase) {
if (__basefield == ios_base::oct) {
*__buffer_ptr++ = '0';
``````````
</details>
https://github.com/llvm/llvm-project/pull/133572
More information about the libcxx-commits
mailing list