Support floating point literals of the form "1e-16f" which specify an exponent but no decimal point.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44431 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Lex/LiteralSupport.cpp b/Lex/LiteralSupport.cpp
index f6d1a86..d00d9c3 100644
--- a/Lex/LiteralSupport.cpp
+++ b/Lex/LiteralSupport.cpp
@@ -261,7 +261,7 @@
       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 @@
     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 == '.') {