Debian Codegraph @

clang/test/AST/HLSL/pch_with_matrix_single_subscript.hlsl

raw
1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -finclude-default-header -emit-pch -o %t %S/Inputs/pch.hlsl
2 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -finclude-default-header -include-pch %t -ast-dump-all %s | FileCheck %s
3
4 float3x2 gM;
5
6 // CHECK: FunctionDecl {{.*}} getRow 'float2 (uint)'
7 // CHECK-NEXT: ParmVarDecl {{.*}} col:20 used row 'uint':'unsigned int'
8 // CHECK-NEXT: CompoundStmt {{.*}}
9 // CHECK-NEXT: ReturnStmt {{.*}}
10 // CHECK-NEXT: ImplicitCastExpr {{.*}} 'vector<float, 2>' <LValueToRValue>
11 // CHECK-NEXT: MatrixSingleSubscriptExpr {{.*}} 'vector<float, 2>' lvalue matrixcomponent
12 // CHECK-NEXT: DeclRefExpr {{.*}} 'hlsl_constant float3x2':'matrix<float hlsl_constant, 3, 2>' lvalue Var {{.*}} 'gM' 'hlsl_constant float3x2':'matrix<float hlsl_constant, 3, 2>'
13 // CHECK-NEXT: DeclRefExpr {{.*}} 'uint':'unsigned int' lvalue ParmVar {{.*}} 'row' 'uint':'unsigned int'
14 float2 getRow(uint row) {
15 return gM[row];
16 }