[libc-commits] [PATCH] D113790: [libc] fix strtof/d/ld NaN parsing
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Fri Nov 12 16:39:50 PST 2021
sivachandra accepted this revision.
sivachandra added a comment.
This revision is now accepted and ready to land.
There is a wide-spread violation of "no braces for single statement blocks."
================
Comment at: libc/src/__support/str_to_float.h:794
+ char *tempSrc = 0;
+ if (isdigit(*(parenStart + 1))) {
+ // This is to prevent errors when BitsType is larger than 64 bits,
----------------
Add a var named `numberStart` to avoid repeated `parentStart + 1`?
================
Comment at: libc/test/src/stdlib/strtof_test.cpp:163
runTest("NaN( 1234)", 3, 0x7fc00000);
+ runTest("NaN(asdf)", 9, 0x7fc00000);
}
----------------
Add a comment explaining whats going on here and in the above line?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113790/new/
https://reviews.llvm.org/D113790
More information about the libc-commits
mailing list