| 1 |
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-pixel -x hlsl -finclude-default-header -o - %s -ast-dump | FileCheck %s |
| 2 |
|
| 3 |
struct S { |
| 4 |
float4 f0 : SV_Position; |
| 5 |
// CHECK: FieldDecl 0x{{[0-9a-fA-F]+}} <{{.*}}> col:10 f0 'float4':'vector<float, 4>' |
| 6 |
// CHECK-NEXT: HLSLParsedSemanticAttr 0x{{[0-9a-f]+}} <col:15> "SV_Position" 0 |
| 7 |
float4 f1 : SV_Position3; |
| 8 |
// CHECK: FieldDecl 0x{{[0-9a-fA-F]+}} <{{.*}}> col:10 referenced f1 'float4':'vector<float, 4>' |
| 9 |
// CHECK-NEXT: HLSLParsedSemanticAttr 0x{{[0-9a-f]+}} <col:15> "SV_Position" 3 |
| 10 |
}; |
| 11 |
|
| 12 |
// FIXME(Keenuts): add mandatory output semantic once those are implemented. |
| 13 |
float4 main(S s) : B { |
| 14 |
// CHECK: FunctionDecl 0x{{[0-9a-fA-F]+}} <{{.*}}> line:[[@LINE-1]]:8 main 'float4 (S)' |
| 15 |
// CHECK-NEXT: ParmVarDecl 0x{{[0-9a-fA-F]+}} <{{.*}}> col:15 used s 'S' |
| 16 |
// CHECK-NEXT: HLSLAppliedSemanticAttr 0x{{[0-9a-f]+}} <line:4:15> "SV_Position" 0 |
| 17 |
// CHECK-NEXT: HLSLAppliedSemanticAttr 0x{{[0-9a-f]+}} <line:7:15> "SV_Position" 3 |
| 18 |
|
| 19 |
// CHECK: HLSLAppliedSemanticAttr 0x{{[0-9a-f]+}} <col:20> "B" 0 |
| 20 |
return s.f1; |
| 21 |
} |