Hello.
When running clang in Debug mode, I am getting an assertion failure when parsing the following line:
float ko = 0x1.1p0;
Apparently, the recent changes in the use of StringRef haven't been propagated to all places. Please find attached the trivial patch.
Cheers,
Enea Zaffanella.
APFloat.patch (343 Bytes)
Can you please also add a test to unittests/ADT/APFloatTest.cpp to validate this, i.e., a test that would fail before this patch but passes with this patch.
Fixed in r79450, along with an additional one of the same nature.
Thanks,
 Daniel
Thanks Daniel and Enea for finding this! I'm adding a lot more test
cases like this to APFloat's unittests so hopefully we won't have any
other bugs lying around.
Thanks Daniel and Enea for finding this! I'm adding a lot more test
cases like this to APFloat's unittests so hopefully we won't have any
other bugs lying around.
I just committed a big batch of unit tests for APFloat, As best as I
can tell, we're in compliance with C99's floating point standard,
ignoring the suffix:
ﬂoatingconstant:
decimalﬂoatingconstant
hexadecimalﬂoatingconstant
decimalﬂoatingconstant:
fractionalconstant exponentpart? ﬂoatingsufﬁx?
digitsequence exponentpart ﬂoatingsufﬁx?
hexadecimalﬂoatingconstant:
hexadecimalpreﬁx hexadecimalfractionalconstant
binaryexponentpart ﬂoatingsufﬁx?
hexadecimalpreﬁx hexadecimaldigitsequence binaryexponentpart
ﬂoatingsufﬁx?
fractionalconstant:
digitsequence? .digitsequence
digitsequence .
exponentpart:
e sign? digitsequence
E sign? digitsequence
sign:
+

digitsequence:
digit
digitsequence digit
hexadecimalfractionalconstant:
hexadecimaldigitsequence? . hexadecimaldigitsequence
hexadecimaldigitsequence .
binaryexponentpart:
p sign? digitsequence
P sign? digitsequence
hexadecimaldigitsequence:
hexadecimaldigit
hexadecimaldigitsequence hexadecimaldigit
ﬂoatingsufﬁx: one of