[libc-commits] [PATCH] D142495: [libc] add scanf current position conversion
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Jan 25 08:48:58 PST 2023
sivachandra added inline comments.
================
Comment at: libc/src/stdio/scanf_core/converter_utils.h:23-33
+constexpr char LIBC_INLINE to_lower(char a) { return a | 32; }
+
+constexpr LIBC_INLINE int b36_char_to_int(char input) {
+ if (internal::isdigit(input))
+ return input - '0';
+ if (internal::isalpha(input))
+ return to_lower(input) + 10 - 'a';
----------------
lntue wrote:
> For consistency, can you keep `LIBC_INLINE` before return types in the definitions.
Not just consistency, it is a requirement as we want to be able to add attributes. I will update the documentation with this information. It should be listed before `constexpr` also.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142495/new/
https://reviews.llvm.org/D142495
More information about the libc-commits
mailing list