[libc-commits] [libc] [libc] Support %lc in printf (PR #169983)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Thu Dec 11 10:00:15 PST 2025


================
@@ -173,7 +174,11 @@ template <typename ArgProvider> class Parser {
         section.has_conv = true;
         break;
       case ('c'):
-        WRITE_ARG_VAL_SIMPLEST(section.conv_val_raw, int, conv_index);
+        if (section.length_modifier == LengthModifier::l) {
----------------
michaelrj-google wrote:

you need to make a similar change in the `get_type_desc` function. Also the wide character handling needs to be guarded by the `LIBC_COPT_PRINTF_DISABLE_WIDE` in the parser as well.

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


More information about the libc-commits mailing list