[libc-commits] [PATCH] D125929: [libc] add printf base 10 integer conversion
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Jun 8 22:01:34 PDT 2022
sivachandra accepted this revision.
sivachandra added a comment.
Feel free to submit after addressing the comments.
================
Comment at: libc/src/stdio/printf_core/int_converter.h:41
+ // conversion is unsigned.
+ flags = static_cast<FormatFlags>(
+ flags & ~(FormatFlags::FORCE_SIGN | FormatFlags::SPACE_PREFIX));
----------------
michaelrj wrote:
> sivachandra wrote:
> > Nit: Do you need the static cast?
> yes. The output of the arithmetic and is an `int` which doesn't have a default conversion to `FormatFlags`
Ah, I meant to ask if you can use `FormatFlags(...)` without the `static_cast`.
================
Comment at: libc/src/stdio/printf_core/string_converter.h:8
//===----------------------------------------------------------------------===//
#include "src/stdio/printf_core/core_structs.h"
----------------
Header guards?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125929/new/
https://reviews.llvm.org/D125929
More information about the libc-commits
mailing list