blob: 824bdb4c883fc4658f27819bfedc6171d8e1a5b1 [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;
Eli Bendersky9b071472014-08-08 14:59:00 +00006__attribute__((shared)) float *g_shared;
Eli Bendersky2581e662014-05-28 19:29:58 +00007__attribute__((host)) void f_host();
8
Rafael Espindolaabbd6d62015-07-13 22:26:30 +00009// CHECK: attributes-cuda.cu:3:30: FunctionDecl=f_device:3:30
10// CHECK-NEXT: attributes-cuda.cu:3:16: attribute(device)
11// CHECK: attributes-cuda.cu:4:30: FunctionDecl=f_global:4:30
12// CHECK-NEXT: attributes-cuda.cu:4:16: attribute(global)
13// CHECK: attributes-cuda.cu:5:32: VarDecl=g_constant:5:32 (Definition)
14// CHECK-NEXT: attributes-cuda.cu:5:16: attribute(constant)
15// CHECK: attributes-cuda.cu:6:32: VarDecl=g_shared:6:32 (Definition)
16// CHECK-NEXT: attributes-cuda.cu:6:16: attribute(shared)
17// CHECK: attributes-cuda.cu:7:28: FunctionDecl=f_host:7:28
18// CHECK-NEXT: attributes-cuda.cu:7:16: attribute(host)