[PATCH] D57321: Fix LexFloatLiteral Lexing
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 30 15:20:22 PST 2019
efriedma added inline comments.
================
Comment at: llvm/lib/MC/MCParser/AsmLexer.cpp:69
/// consumed.
-AsmToken AsmLexer::LexFloatLiteral() {
+AsmToken AsmLexer::LexFloatLiteral(bool isDotSeperated) {
// Skip the fractional digit sequence.
----------------
Spelling
================
Comment at: llvm/lib/MC/MCParser/AsmLexer.cpp:76
// literals here and rely on the upstream client to reject invalid ones (e.g.,
// "1e+").
+ if (isDotSeperated && (*CurPtr == 'e' || *CurPtr == 'E') &&
----------------
The comment here seems to indicate the current behavior of LexFloatLiteral is intentional, and the caller (e.g. AsmParser::parseRealValue or AsmParser::parsePrimaryExpr) should handle ill-formed floats with a more specific error message. Do you think that design is wrong?
If you do think that design is wrong, please update the comments to describe what you think should happen instead.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57321/new/
https://reviews.llvm.org/D57321
More information about the llvm-commits
mailing list