From d87c9e7da2e87f224c426832f08897269c2e5636 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 5 Feb 2019 18:39:15 +0000 Subject: Vendor import of clang release_80 branch r353167: https://llvm.org/svn/llvm-project/cfe/branches/release_80@353167 --- lib/Lex/LiteralSupport.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/Lex/LiteralSupport.cpp') 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; -- cgit v1.2.3