]> granicus.if.org Git - clang/commit
[OpenCL] Added half type literal with suffix h.
authorAnastasia Stulova <anastasia.stulova@arm.com>
Wed, 17 Feb 2016 11:34:37 +0000 (11:34 +0000)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Wed, 17 Feb 2016 11:34:37 +0000 (11:34 +0000)
commit2a90a32756ddd2273bc73bf900ef97016f063c1b
treedee944fc262c29a076055d3cffe8cacd7ee5fa30
parentd647fbfe823993c92cdcf0ada6614fcbd3639519
[OpenCL] Added half type literal with suffix h.

OpenCL Extension v1.2 s9.5 allows half precision floating point
type literals with suffices h or H when cl_khr_fp16 is enabled.

Example:  half x = 1.0h;

Patch by Liu Yaxun (Sam)!

Differential Revision: http://reviews.llvm.org/D16865

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261084 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Lex/LiteralSupport.h
lib/Lex/LiteralSupport.cpp
lib/Sema/SemaExpr.cpp
test/Lexer/half-literal.cpp [new file with mode: 0644]
test/Lexer/opencl-half-literal.cl [new file with mode: 0644]
test/SemaOpenCL/half.cl