1 //RUN: %clang_cc1 %s -pedantic -ast-dump -verify | FileCheck %s
4 //CHECK: |-VarDecl {{.*}} ai '__global int'
9 //CHECK: VarDecl {{.*}} ai '__private int'
13 //CHECK: VarDecl {{.*}} used cai '__constant int'
14 __constant auto cai = c;
15 //CHECK: VarDecl {{.*}} aii '__private int'
18 //CHECK: VarDecl {{.*}} ref '__private int &__private'
20 //CHECK: VarDecl {{.*}} ptr '__private int *__private'
22 //CHECK: VarDecl {{.*}} ref_c '__constant int &__private'
25 //CHECK: VarDecl {{.*}} ptrptr '__private int *__generic *__private'
27 //CHECK: VarDecl {{.*}} refptr '__private int *__generic &__private'
30 //CHECK: VarDecl {{.*}} invalid gref '__global auto &__private'
31 __global auto &gref = i; //expected-error{{variable 'gref' with type '__global auto &__private' has incompatible initializer of type '__private int'}}
33 //CHECK: VarDecl {{.*}} invalid gptr '__global auto *__private'
34 __global auto *gptr = ptr_l; //expected-error{{variable 'gptr' with type '__global auto *__private' has incompatible initializer of type '__local int *__private'}}