[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / SemaCUDA / builtins-unsafe-atomics-gfx90a.cu
blob6f1484c68ec711892a5ac463ac76b05ef4672dc4
1 // RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -target-cpu gfx90a -x hip \
2 // RUN:  -aux-triple x86_64-unknown-linux-gnu -fcuda-is-device %s \
3 // RUN:  -fsyntax-only -verify
4 // expected-no-diagnostics
6 #define __device__ __attribute__((device))
7 typedef __attribute__((address_space(3))) float *LP;
9 __device__ void test_ds_atomic_add_f32(float *addr, float val) {
10   float *rtn;
11   *rtn = __builtin_amdgcn_ds_faddf((LP)addr, val, 0, 0, 0);