1 // RUN: %clang_cc1 %s -triple spir-unknown-unknown -pedantic -verify -ast-dump | FileCheck %s
3 // expected-no-diagnostics
5 //CHECK:`-FunctionDecl {{.*}} bar 'void (__global int *__private)'
6 //CHECK: |-ParmVarDecl {{.*}} used gl '__global int *__private'
7 //CHECK: `-VarDecl {{.*}} gen '__generic int *__private' cinit
8 //CHECK: `-CXXAddrspaceCastExpr {{.*}} '__generic int *' addrspace_cast<__generic int *> <AddressSpaceConversion>
9 //CHECK: `-DeclRefExpr {{.*}} '__global int *__private' lvalue ParmVar {{.*}} 'gl' '__global int *__private'
11 void bar(global int *gl) {
12 int *gen = addrspace_cast<int *>(gl);