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 llvm-svn: 352488
8 lines
195 B
Plaintext
8 lines
195 B
Plaintext
// RUN: %clang_cc1 -fsyntax-only -triple x86_64 -aux-triple amdgcn -verify %s
|
|
// expected-no-diagnostics
|
|
#include "Inputs/cuda.h"
|
|
|
|
__device__ void f(_Float16 x);
|
|
|
|
__device__ _Float16 x = 1.0f16;
|