[libc-commits] [PATCH] D144208: [libc] use vars in string to num fuzz targets

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Feb 16 22:23:21 PST 2023


lntue added inline comments.


================
Comment at: libc/fuzzing/stdlib/strtofloat_fuzz.cpp:49
+  // If any of the outputs are NaN
+  if (atof_output != atof_output || strtof_output != strtof_output ||
+      strtod_output != strtod_output || strtold_output != strtold_output) {
----------------
Maybe adding an inline function will help with readability here:
```
template <typename T>
LIBC_INLINE bool is_nan(T x) { return x != x; }
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144208/new/

https://reviews.llvm.org/D144208



More information about the libc-commits mailing list