[flang][cuda] Adapt ExternalNameConversion to work in gpu module (#117039)
[llvm-project.git] / clang / test / AST / ast-dump-managed-var.cu
blob862a70c81f9e945a8204377981d1669a8d116a77
1 // RUN: %clang_cc1 -ast-dump -x hip %s | FileCheck %s
2 // RUN: %clang_cc1 -ast-dump -fcuda-is-device -x hip %s | FileCheck %s
4 #include "Inputs/cuda.h"
6 // CHECK-LABEL: VarDecl {{.*}} m1 'int'
7 // CHECK-NEXT: HIPManagedAttr
8 // CHECK-NEXT: CUDADeviceAttr {{.*}}Implicit
9 __managed__ int m1;
11 // CHECK-LABEL: VarDecl {{.*}} m2 'int'
12 // CHECK-NEXT: HIPManagedAttr
13 // CHECK-NEXT: CUDADeviceAttr {{.*}}Implicit
14 // CHECK-NOT: HIPManagedAttr
15 // CHECK-NOT: CUDADeviceAttr
16 __managed__ __managed__ int m2;
18 // CHECK-LABEL: VarDecl {{.*}} m3 'int'
19 // CHECK-NEXT: HIPManagedAttr
20 // CHECK-NEXT: CUDADeviceAttr {{.*}}line
21 // CHECK-NOT: CUDADeviceAttr {{.*}}Implicit
22 __managed__ __device__ int m3;
24 // CHECK-LABEL: VarDecl {{.*}} m3a 'int'
25 // CHECK-NEXT: CUDADeviceAttr {{.*}}cuda.h
26 // CHECK-NEXT: HIPManagedAttr
27 // CHECK-NOT: CUDADeviceAttr {{.*}}Implicit
28 __device__ __managed__ int m3a;