diff options
author | Christopher Lamb <christopher.lamb@gmail.com> | 2007-11-29 06:06:27 +0000 |
---|---|---|
committer | Christopher Lamb <christopher.lamb@gmail.com> | 2007-11-29 06:06:27 +0000 |
commit | 42e69f219daa4ca101e1758029aaede4ce1f3a1d (patch) | |
tree | 3e4f9bfc2fea430300d328cff772f757b3c87216 /clang/Lex | |
parent | d1f0e3d79115e11fb1c698823e329f375c601eba (diff) | |
download | bcm5719-llvm-42e69f219daa4ca101e1758029aaede4ce1f3a1d.tar.gz bcm5719-llvm-42e69f219daa4ca101e1758029aaede4ce1f3a1d.zip |
Support floating point literals of the form "1e-16f" which specify an exponent but no decimal point.
llvm-svn: 44431
Diffstat (limited to 'clang/Lex')
-rw-r--r-- | clang/Lex/LiteralSupport.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/Lex/LiteralSupport.cpp b/clang/Lex/LiteralSupport.cpp index f6d1a867a32..d00d9c3b164 100644 --- a/clang/Lex/LiteralSupport.cpp +++ b/clang/Lex/LiteralSupport.cpp @@ -261,7 +261,7 @@ NumericLiteralParser(const char *begin, const char *end, s = SkipOctalDigits(s); if (s == ThisTokEnd) { // Done. - } else if (isxdigit(*s)) { + } else if (isxdigit(*s) && !(*s == 'e' || *s == 'E')) { TokLoc = PP.AdvanceToTokenCharacter(TokLoc, s-begin); Diag(TokLoc, diag::err_invalid_octal_digit, std::string(s, s+1)); return; @@ -290,7 +290,7 @@ NumericLiteralParser(const char *begin, const char *end, s = SkipDigits(s); if (s == ThisTokEnd) { // Done. - } else if (isxdigit(*s)) { + } else if (isxdigit(*s) && !(*s == 'e' || *s == 'E')) { Diag(TokLoc, diag::err_invalid_decimal_digit, std::string(s, s+1)); return; } else if (*s == '.') { |