From: Daniel Dunbar Date: Fri, 24 Sep 2010 17:10:26 +0000 (+0000) Subject: MC/AsmParser: Handle a missed case of floating literals in the lexer. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=facb34b41cea284b5a0b4992ff619e5cfd5e6a22;p=oota-llvm.git MC/AsmParser: Handle a missed case of floating literals in the lexer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114733 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/MC/MCParser/AsmLexer.cpp b/lib/MC/MCParser/AsmLexer.cpp index 59da3817c18..1a71d2437df 100644 --- a/lib/MC/MCParser/AsmLexer.cpp +++ b/lib/MC/MCParser/AsmLexer.cpp @@ -145,7 +145,7 @@ static void SkipIgnoredIntegerSuffix(const char *&CurPtr) { /// Decimal integer: [1-9][0-9]* AsmToken AsmLexer::LexDigit() { // Decimal integer: [1-9][0-9]* - if (CurPtr[-1] != '0') { + if (CurPtr[-1] != '0' || CurPtr[0] == '.') { while (isdigit(*CurPtr)) ++CurPtr; diff --git a/test/MC/AsmParser/floating-literals.s b/test/MC/AsmParser/floating-literals.s index 44f8a5ab0a7..dbeb81fb9ee 100644 --- a/test/MC/AsmParser/floating-literals.s +++ b/test/MC/AsmParser/floating-literals.s @@ -10,3 +10,6 @@ # CHECK: .quad 4597526701198935065 # CHECK: .quad -4600933674317040845 .double 5, .232, -11.1 + +# CHECK: .quad 0 +.double 0.0