From ab36f33db8ed1cd16277016f834527254c7a3d0f Mon Sep 17 00:00:00 2001 From: Sjoerd Meijer Date: Fri, 8 Sep 2017 09:42:32 +0000 Subject: Add _Float16 as a C/C++ source language type This adds _Float16 as a source language type, which is a 16-bit floating point type defined in C11 extension ISO/IEC TS 18661-3. In follow up patches documentation and more tests will be added. Differential Revision: https://reviews.llvm.org/D33719 llvm-svn: 312781 --- clang/lib/Sema/DeclSpec.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/Sema/DeclSpec.cpp') diff --git a/clang/lib/Sema/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp index e4e84fcec95..bce493989d2 100644 --- a/clang/lib/Sema/DeclSpec.cpp +++ b/clang/lib/Sema/DeclSpec.cpp @@ -336,6 +336,7 @@ bool Declarator::isDeclarationOfFunction() const { case TST_decimal32: case TST_decimal64: case TST_double: + case TST_Float16: case TST_float128: case TST_enum: case TST_error: @@ -505,6 +506,7 @@ const char *DeclSpec::getSpecifierName(DeclSpec::TST T, case DeclSpec::TST_half: return "half"; case DeclSpec::TST_float: return "float"; case DeclSpec::TST_double: return "double"; + case DeclSpec::TST_float16: return "_Float16"; case DeclSpec::TST_float128: return "__float128"; case DeclSpec::TST_bool: return Policy.Bool ? "bool" : "_Bool"; case DeclSpec::TST_decimal32: return "_Decimal32"; -- cgit v1.2.3