1// RUN: c-index-test -test-print-type %s | FileCheck %s 2 3#pragma OPENCL EXTENSION cl_khr_fp16 : enable 4#pragma OPENCL EXTENSION cl_khr_fp64 : enable 5 6typedef half half4 __attribute__((ext_vector_type(4))); 7typedef float float4 __attribute__((ext_vector_type(4))); 8typedef double double4 __attribute__((ext_vector_type(4))); 9 10void kernel testFloatTypes() { 11 half scalarHalf; 12 half4 vectorHalf; 13 float scalarFloat; 14 float4 vectorFloat; 15 double scalarDouble; 16 double4 vectorDouble; 17} 18 19// CHECK: VarDecl=scalarHalf:11:8 (Definition) [type=half] [typekind=Half] [isPOD=1] 20// CHECK: VarDecl=vectorHalf:12:9 (Definition) [type=half4] [typekind=Typedef] [canonicaltype=half __attribute__((ext_vector_type(4)))] [canonicaltypekind=Unexposed] [isPOD=1] 21// CHECK: VarDecl=scalarFloat:13:9 (Definition) [type=float] [typekind=Float] [isPOD=1] 22// CHECK: VarDecl=vectorFloat:14:10 (Definition) [type=float4] [typekind=Typedef] [canonicaltype=float __attribute__((ext_vector_type(4)))] [canonicaltypekind=Unexposed] [isPOD=1] 23// CHECK: VarDecl=scalarDouble:15:10 (Definition) [type=double] [typekind=Double] [isPOD=1] 24// CHECK: VarDecl=vectorDouble:16:11 (Definition) [type=double4] [typekind=Typedef] [canonicaltype=double __attribute__((ext_vector_type(4)))] [canonicaltypekind=Unexposed] [isPOD=1] 25