[libc-commits] [PATCH] D123424: [libc][NFC] add index mode to printf parser

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri May 6 10:22:50 PDT 2022


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


================
Comment at: libc/src/stdio/printf_core/parser.h:121
+
+  void inline set_desc_arr(size_t index, TypeDesc value) {
+    if (index != 0 && index <= DESC_ARR_LEN)
----------------
Nit: `set_type_desc` to match `get_type_desc` below?


================
Comment at: libc/src/stdio/printf_core/parser.h:142
+  // args_cur back to args_start and reset args_index to 1. Once index is
+  // greater than args_index, it will iterate through
+  void args_to_index(size_t index);
----------------
Update this comment with info about why this function exists. IIUC, it is adjusting to the current index in the varargs?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123424



More information about the libc-commits mailing list