[libc-commits] [PATCH] D148179: [libc] Make printf decimal long doubles use hex

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue May 2 22:52:43 PDT 2023


sivachandra accepted this revision.
sivachandra added inline comments.
This revision is now accepted and ready to land.


================
Comment at: libc/src/stdio/printf_core/float_hex_converter.h:33
   // the appropriate case based on the name of the conversion.
-  // Since the name of the conversion is also 'a', we can just use it directly.
-  const char a = to_conv.conv_name;
+  const char a = (to_conv.conv_name & 32) | 'A';
 
----------------
I think, whats going on here is that you are converting the other conversion names, `e`, `f` and `g` to `a` and `E`, `F` and `G` to `A`. If this is correct, can you add a comment?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148179/new/

https://reviews.llvm.org/D148179



More information about the libc-commits mailing list