diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-02-05 18:39:15 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-02-05 18:39:15 +0000 |
commit | d87c9e7da2e87f224c426832f08897269c2e5636 (patch) | |
tree | 9492632723d36c1c80f3daca3974f362eea84a7a /lib/Lex/LiteralSupport.cpp | |
parent | 292698a8537d1e51bbcd339f8a19b2b7d7f1e1f6 (diff) |
Notes
Diffstat (limited to 'lib/Lex/LiteralSupport.cpp')
-rw-r--r-- | lib/Lex/LiteralSupport.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Lex/LiteralSupport.cpp b/lib/Lex/LiteralSupport.cpp index fa0815eb9c6c5..3c1da075b0e26 100644 --- a/lib/Lex/LiteralSupport.cpp +++ b/lib/Lex/LiteralSupport.cpp @@ -617,10 +617,11 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, if (isHalf || isFloat || isLong || isFloat128) break; // HF, FF, LF, QF invalid. - if (s + 2 < ThisTokEnd && s[1] == '1' && s[2] == '6') { - s += 2; // success, eat up 2 characters. - isFloat16 = true; - continue; + if (PP.getTargetInfo().hasFloat16Type() && s + 2 < ThisTokEnd && + s[1] == '1' && s[2] == '6') { + s += 2; // success, eat up 2 characters. + isFloat16 = true; + continue; } isFloat = true; |