[libc-commits] [libc] [libc][printf] Fix %s precision handling (PR #233098)
via libc-commits
libc-commits at lists.llvm.org
Sat Oct 17 19:59:56 PDT 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,cpp -- libc/src/__support/printf_core/string_converter.h libc/test/src/__support/printf_core/converter_test.cpp --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/libc/test/src/__support/printf_core/converter_test.cpp b/libc/test/src/__support/printf_core/converter_test.cpp
index 3f2a96e82..427a7d1fe 100644
--- a/libc/test/src/__support/printf_core/converter_test.cpp
+++ b/libc/test/src/__support/printf_core/converter_test.cpp
@@ -301,7 +301,7 @@ TYPED_TEST(LlvmLibcPrintfConverterTest, StringConversionNoNullTerminator,
no_null_terminator_conv.precision = 3;
if constexpr (LIBC_NAMESPACE::cpp::is_same_v<CharT, wchar_t>) {
no_null_terminator_conv.length_modifier =
- LIBC_NAMESPACE::printf_core::LengthModifier::l;
+ LIBC_NAMESPACE::printf_core::LengthModifier::l;
}
no_null_terminator_conv.conv_val_ptr = const_cast<CharT *>(input);
``````````
</details>
https://github.com/llvm/llvm-project/pull/233098
More information about the libc-commits
mailing list