summaryrefslogtreecommitdiff
path: root/libc/fuzzing/stdlib/strtofloat_fuzz.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2023-09-26 11:45:04 +0200
committerGitHub <noreply@github.com>2023-09-26 11:45:04 +0200
commitb6bc9d72f65a5086f310f321e969d96e9a559e75 (patch)
tree1e9a9f8c36c9dfc0106507f7b7a0055af83c4a07 /libc/fuzzing/stdlib/strtofloat_fuzz.cpp
parent7675f541f75baa20e8ec007cd625a837e89fc01f (diff)
[libc] Mass replace enclosing namespace (#67032)
This is step 4 of https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079
Diffstat (limited to 'libc/fuzzing/stdlib/strtofloat_fuzz.cpp')
-rw-r--r--libc/fuzzing/stdlib/strtofloat_fuzz.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libc/fuzzing/stdlib/strtofloat_fuzz.cpp b/libc/fuzzing/stdlib/strtofloat_fuzz.cpp
index 5ef506a08e4c..f6cc8abedf46 100644
--- a/libc/fuzzing/stdlib/strtofloat_fuzz.cpp
+++ b/libc/fuzzing/stdlib/strtofloat_fuzz.cpp
@@ -22,7 +22,7 @@
#include "utils/MPFRWrapper/mpfr_inc.h"
-using __llvm_libc::fputil::FloatProperties;
+using LIBC_NAMESPACE::fputil::FloatProperties;
// This function calculates the effective precision for a given float type and
// exponent. Subnormals have a lower effective precision since they don't
@@ -113,7 +113,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
mpfr_init2(mpfr_float, float_precision);
mpfr_strtofr(mpfr_float, str_ptr, &out_ptr, base, MPFR_RNDN);
float volatile float_result = mpfr_get_flt(mpfr_float, MPFR_RNDN);
- auto volatile strtof_result = __llvm_libc::strtof(str_ptr, &out_ptr);
+ auto volatile strtof_result = LIBC_NAMESPACE::strtof(str_ptr, &out_ptr);
ptrdiff_t strtof_strlen = out_ptr - str_ptr;
if (result_strlen != strtof_strlen)
__builtin_trap();
@@ -132,8 +132,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
mpfr_init2(mpfr_double, double_precision);
mpfr_strtofr(mpfr_double, str_ptr, &out_ptr, base, MPFR_RNDN);
double volatile double_result = mpfr_get_d(mpfr_double, MPFR_RNDN);
- auto volatile strtod_result = __llvm_libc::strtod(str_ptr, &out_ptr);
- auto volatile atof_result = __llvm_libc::atof(str_ptr);
+ auto volatile strtod_result = LIBC_NAMESPACE::strtod(str_ptr, &out_ptr);
+ auto volatile atof_result = LIBC_NAMESPACE::atof(str_ptr);
ptrdiff_t strtod_strlen = out_ptr - str_ptr;
if (result_strlen != strtod_strlen)
__builtin_trap();
@@ -153,7 +153,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
mpfr_strtofr(mpfr_long_double, str_ptr, &out_ptr, base, MPFR_RNDN);
long double volatile long_double_result =
mpfr_get_ld(mpfr_long_double, MPFR_RNDN);
- auto volatile strtold_result = __llvm_libc::strtold(str_ptr, &out_ptr);
+ auto volatile strtold_result = LIBC_NAMESPACE::strtold(str_ptr, &out_ptr);
ptrdiff_t strtold_strlen = out_ptr - str_ptr;
if (result_strlen != strtold_strlen)
__builtin_trap();