]> granicus.if.org Git - clang/commit
[CUDA][HIP] Do not diagnose use of _Float16
authorYaxun Liu <Yaxun.Liu@amd.com>
Tue, 29 Jan 2019 13:20:23 +0000 (13:20 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Tue, 29 Jan 2019 13:20:23 +0000 (13:20 +0000)
commit248e5bf6ef4ecf292928b99bf755b26b6ebd3c6f
tree0ea91671921306e520582076fc8c527bab9d04eb
parentd507ee11ead38846eec05eae085c6935abcead47
[CUDA][HIP] Do not diagnose use of _Float16

r352221 caused regressions in CUDA/HIP since device function may use _Float16 whereas host does not support it.
In this case host compilation should not diagnose usage of _Float16 in device functions or variables.

For now just do not diagnose _Float16 for CUDA/HIP. In the future we should have more precise check.

Differential Revision: https://reviews.llvm.org/D57369

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352488 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Lex/LiteralSupport.cpp
lib/Sema/SemaType.cpp
test/SemaCUDA/float16.cu [new file with mode: 0644]