[libc-commits] [libc] [libc] Support ls in printf (PR #178841)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Wed Feb 4 14:47:12 PST 2026


================
@@ -24,21 +33,63 @@ template <WriteMode write_mode>
 LIBC_INLINE int convert_string(Writer<write_mode> *writer,
                                const FormatSection &to_conv) {
   size_t string_len = 0;
-  const char *str_ptr = reinterpret_cast<const char *>(to_conv.conv_val_ptr);
+
+  if (to_conv.length_modifier == LengthModifier::l) {
----------------
michaelrj-google wrote:

the execution paths for wide mode and byte mode seem like they're almost completely separate. For readability it would be best to split them out into helper functions.

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


More information about the libc-commits mailing list