[libc] add result class to strtointeger
authorMichael Jones <michaelrj@google.com>
Thu, 1 Sep 2022 22:19:35 +0000 (15:19 -0700)
committerMichael Jones <michaelrj@google.com>
Fri, 9 Dec 2022 22:35:47 +0000 (14:35 -0800)
commit74da5e6c082edff19981892328d724a8e02ffcd9
tree6a17bc318ebd6ef9956dcc93e7b35cc62cefa9ec
parent142e38007d956c20c94d4c379f8c66152c99d437
[libc] add result class to strtointeger

This is a class intended to improve errno handling for internal
functions by allowing functions to return their result and error status
instead of setting errno. This specific class will be used for
strtointeger and (in a followup patch) strtofloat.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D133163
17 files changed:
libc/src/__support/CMakeLists.txt
libc/src/__support/high_precision_decimal.h
libc/src/__support/str_to_float.h
libc/src/__support/str_to_integer.h
libc/src/__support/str_to_num_result.h [new file with mode: 0644]
libc/src/inttypes/strtoimax.cpp
libc/src/inttypes/strtoumax.cpp
libc/src/stdio/printf_core/parser.cpp
libc/src/stdio/scanf_core/parser.cpp
libc/src/stdlib/atoi.cpp
libc/src/stdlib/atol.cpp
libc/src/stdlib/atoll.cpp
libc/src/stdlib/strtol.cpp
libc/src/stdlib/strtoll.cpp
libc/src/stdlib/strtoul.cpp
libc/src/stdlib/strtoull.cpp
utils/bazel/llvm-project-overlay/libc/BUILD.bazel