Fix the fact that previously strtof/d/ld would only accept a NaN as
having parentheses if the thing in the parentheses was a valid number,
now it will accept any combination of letters and numbers, but will only
put valid numbers in the mantissa.
Details
Details
- Reviewers
sivachandra lntue - Commits
- rG47d0c83e1f5f: [libc] fix strtof/d/ld NaN parsing
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
clarify the code
libc/src/__support/str_to_float.h | ||
---|---|---|
797 | While that is possible, I'm not sure if it would help. Currently parenStart + 1 is only used twice, so I don't think defining a new variable would be useful. Instead I renamed the variable to be leftParen, so that it's more clear that it points to the left parenthesis. | |
libc/test/src/stdlib/strtof_test.cpp | ||
181 | Should be more clear now. |
Add a var named numberStart to avoid repeated parentStart + 1?