aboutsummaryrefslogtreecommitdiff
path: root/Lex/LiteralSupport.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-08-26 03:29:23 +0000
committerChris Lattner <sabre@nondot.org>2007-08-26 03:29:23 +0000
commit6e400c286b485e28d04a742ea87860ddfefa672e (patch)
treeb1b7d5808515dc322a5966206e29254ffb120946 /Lex/LiteralSupport.cpp
parent506b8dec4ed3db3c60bf9e0dd37901f0cf3d6749 (diff)
1.0 is double, 1.0F is a float.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41412 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Lex/LiteralSupport.cpp')
-rw-r--r--Lex/LiteralSupport.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lex/LiteralSupport.cpp b/Lex/LiteralSupport.cpp
index 82765522d7..04282563ea 100644
--- a/Lex/LiteralSupport.cpp
+++ b/Lex/LiteralSupport.cpp
@@ -202,10 +202,10 @@ NumericLiteralParser(const char *begin, const char *end,
s = DigitsBegin = begin;
saw_exponent = false;
saw_period = false;
- saw_float_suffix = false;
isLong = false;
isUnsigned = false;
isLongLong = false;
+ isFloat = false;
isImaginary = false;
hadError = false;
@@ -326,8 +326,8 @@ NumericLiteralParser(const char *begin, const char *end,
case 'f': // FP Suffix for "float"
case 'F':
if (!isFPConstant) break; // Error for integer constant.
- if (saw_float_suffix || isLong) break; // FF, LF invalid.
- saw_float_suffix = true;
+ if (isFloat || isLong) break; // FF, LF invalid.
+ isFloat = true;
continue; // Success.
case 'u':
case 'U':
@@ -338,7 +338,7 @@ NumericLiteralParser(const char *begin, const char *end,
case 'l':
case 'L':
if (isLong || isLongLong) break; // Cannot be repeated.
- if (saw_float_suffix) break; // LF invalid.
+ if (isFloat) break; // LF invalid.
// Check for long long. The L's need to be adjacent and the same case.
if (s+1 != ThisTokEnd && s[1] == s[0]) {