30 lines · plain
1// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-pixel -x hlsl -finclude-default-header -o - %s -ast-dump | FileCheck %s2 3struct A {4 float4 x : A;5// CHECK: FieldDecl 0x{{[0-9a-fA-F]+}} <{{.*}}> col:10 referenced x 'float4':'vector<float, 4>'6// CHECK-NEXT: HLSLParsedSemanticAttr 0x{{[0-9a-f]+}} <col:14> "A" 07};8 9struct Top {10 A f0 : B;11// CHECK: FieldDecl 0x{{[0-9a-fA-F]+}} <{{.*}}> col:5 referenced f0 'A'12// CHECK-NEXT: HLSLParsedSemanticAttr 0x{{[0-9a-f]+}} <col:10> "B" 013 A f1 : C;14// CHECK: FieldDecl 0x{{[0-9a-fA-F]+}} <{{.*}}> col:5 f1 'A'15// CHECK-NEXT: HLSLParsedSemanticAttr 0x{{[0-9a-f]+}} <col:10> "C" 016};17 18 19// FIXME(Keenuts): add mandatory output semantic once those are implemented.20float4 main(Top s : D) : F4 {21// CHECK: FunctionDecl 0x{{[0-9a-fA-F]+}} <{{.*}}> line:[[@LINE-1]]:8 main 'float4 (Top)'22// CHECK-NEXT: ParmVarDecl 0x{{[0-9a-fA-F]+}} <{{.*}}> col:17 used s 'Top'23// CHECK-NEXT: HLSLParsedSemanticAttr 0x{{[0-9a-f]+}} <col:21> "D" 024// CHECK-NEXT: HLSLAppliedSemanticAttr 0x{{[0-9a-f]+}} <col:21> "D" 025// CHECK-NEXT: HLSLAppliedSemanticAttr 0x{{[0-9a-f]+}} <col:21> "D" 126 27// CHECK: HLSLAppliedSemanticAttr 0x{{[0-9a-f]+}} <col:26> "F" 428 return s.f0.x;29}30