llvm-for-llvmta/tools/clang/test/SemaOpenCLCXX/addrspace_cast_ast_dump.cl

14 lines
646 B
Common Lisp
Raw Normal View History

2022-04-25 13:02:35 +02:00
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -pedantic -verify -ast-dump | FileCheck %s
// expected-no-diagnostics
//CHECK:`-FunctionDecl {{.*}} bar 'void (__global int *__private)'
//CHECK: |-ParmVarDecl {{.*}} used gl '__global int *__private'
//CHECK: `-VarDecl {{.*}} gen '__generic int *__private' cinit
//CHECK: `-CXXAddrspaceCastExpr {{.*}} '__generic int *' addrspace_cast<__generic int *> <AddressSpaceConversion>
//CHECK: `-DeclRefExpr {{.*}} '__global int *__private' lvalue ParmVar {{.*}} 'gl' '__global int *__private'
void bar(global int *gl) {
int *gen = addrspace_cast<int *>(gl);
}