[llvm-branch-commits] [cfe-branch] r352365 - Merging r352229:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jan 28 06:10:30 PST 2019
Author: hans
Date: Mon Jan 28 06:10:30 2019
New Revision: 352365
URL: http://llvm.org/viewvc/llvm-project?rev=352365&view=rev
Log:
Merging r352229:
Redirecting to URL 'https://llvm.org/svn/llvm-project/cfe/trunk':
------------------------------------------------------------------------
r352229 | erichkeane | 2019-01-25 19:36:20 +0100 (Fri, 25 Jan 2019) | 7 lines
Remove F16 literal support based on Float16 support.
Float16 support was disabled recently on many platforms, however that
commit still allowed literals of Float16 type to work. This commit
removes those based on the same logic as Float16 disable.
Change-Id: I72243048ae2db3dc47bd3d699843e3edf9c395ea
------------------------------------------------------------------------
Added:
cfe/branches/release_80/test/SemaCXX/Float16.cpp
- copied unchanged from r352229, cfe/trunk/test/SemaCXX/Float16.cpp
Modified:
cfe/branches/release_80/ (props changed)
cfe/branches/release_80/lib/Lex/LiteralSupport.cpp
Propchange: cfe/branches/release_80/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jan 28 06:10:30 2019
@@ -1,4 +1,4 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:351334,351340,351344,351360,351457,351459,351531,351579-351580,352040,352079,352099,352102,352105,352221-352222,352323
+/cfe/trunk:351334,351340,351344,351360,351457,351459,351531,351579-351580,352040,352079,352099,352102,352105,352221-352222,352229,352323
/cfe/trunk/test:170344
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_80/lib/Lex/LiteralSupport.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_80/lib/Lex/LiteralSupport.cpp?rev=352365&r1=352364&r2=352365&view=diff
==============================================================================
--- cfe/branches/release_80/lib/Lex/LiteralSupport.cpp (original)
+++ cfe/branches/release_80/lib/Lex/LiteralSupport.cpp Mon Jan 28 06:10:30 2019
@@ -617,10 +617,11 @@ NumericLiteralParser::NumericLiteralPars
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;
More information about the llvm-branch-commits
mailing list