This is the first piece of scanf. It's very similar in design to printf,
and so much of the code is copied from that. There were potential issues
with conflicting macros so I've also renamed the "ASSERT_FORMAT_EQ"
macro for printf to "ASSERT_PFORMAT_EQ".
Details
- Reviewers
sivachandra lntue - Commits
- rG7a129f07562d: [libc] add scanf parser and core utilities
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libc/src/stdio/scanf_core/core_structs.h | ||
---|---|---|
24 | Bikeshed: Since the case is already mixed, why not just call it NONE instead of none? | |
33 | We have a bitset class: https://github.com/llvm/llvm-project/blob/main/libc/src/__support/CPP/bitset.h | |
46 | Add doc-strings explaining what this method is doing and its intended use case. | |
81 | Feel free to add a flip method to cpp::bitset in a separate CL - https://en.cppreference.com/w/cpp/utility/bitset/flip | |
101 | Instead of literal 0, use a symbolic flag value, say NONE. So, this then becomes: FormatFlags flags = FormatFlags::NONE; | |
143 | Why are they not enum constants? | |
libc/src/stdio/scanf_core/parser.h | ||
29 | May be there is a typo somewhere in this comment? | |
libc/src/stdio/scanf_core/scanf_config.h | ||
13 | Add commentary explaining how are these to be used/tuned/configured. |
libc/src/stdio/scanf_core/core_structs.h | ||
---|---|---|
80 | Nit: The name should reflect that it is about errors. So, may be ErrorCodes. |
Bikeshed: Since the case is already mixed, why not just call it NONE instead of none?