blob: 953ef3d51fee23f5680a2b49f955a7d1103cef89 [file] [log] [blame]
Aaron Ballmana670c202014-05-29 16:39:42 +00001// RUN: c-index-test -test-load-source all -x cuda %s | FileCheck %s
Eli Bendersky2581e662014-05-28 19:29:58 +00002
3__attribute__((device)) void f_device();
4__attribute__((global)) void f_global();
5__attribute__((constant)) int* g_constant;
6__attribute__((host)) void f_host();
7
Eli Bendersky2581e662014-05-28 19:29:58 +00008// CHECK: attributes-cuda.cu:3:30: FunctionDecl=f_device:3:30
9// CHECK-NEXT: attributes-cuda.cu:3:16: attribute(device)
10// CHECK: attributes-cuda.cu:4:30: FunctionDecl=f_global:4:30
11// CHECK-NEXT: attributes-cuda.cu:4:16: attribute(global)
12// CHECK: attributes-cuda.cu:5:32: VarDecl=g_constant:5:32 (Definition)
13// CHECK-NEXT: attributes-cuda.cu:5:16: attribute(constant)
14// CHECK: attributes-cuda.cu:6:28: FunctionDecl=f_host:6:28
15// CHECK-NEXT: attributes-cuda.cu:6:16: attribute(host)