1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -ast-dump -x hlsl -o - %s | FileCheck %s
\r
5 // CHECK: FieldDecl 0x{{[0-9a-f]+}} <line:9:3, col:25> col:16 referenced field1 'unsigned int'
\r
6 // CHECK:-ConstantExpr 0x{{[0-9a-f]+}} <col:25> 'int'
\r
7 // CHECK:-value: Int 3
\r
8 // CHECK:-IntegerLiteral 0x{{[0-9a-f]+}} <col:25> 'int' 3
\r
9 unsigned int field1 : 3; // 3 bits for field1
\r
11 // CHECK:FieldDecl 0x{{[0-9a-f]+}} <line:15:3, col:25> col:16 referenced field2 'unsigned int'
\r
12 // CHECK:-ConstantExpr 0x{{[0-9a-f]+}} <col:25> 'int'
\r
13 // CHECK:-value: Int 4
\r
14 // CHECK:-IntegerLiteral 0x{{[0-9a-f]+}} <col:25> 'int' 4
\r
15 unsigned int field2 : 4; // 4 bits for field2
\r
17 // CHECK:FieldDecl 0x{{[0-9a-f]+}} <line:21:3, col:16> col:7 field3 'int'
\r
18 // CHECK:-ConstantExpr 0x{{[0-9a-f]+}} <col:16> 'int'
\r
19 // CHECK:-value: Int 5
\r
20 // CHECK:-IntegerLiteral 0x{{[0-9a-f]+}} <col:16> 'int' 5
\r
21 int field3 : 5; // 5 bits for field3 (signed)
\r
30 m.field2 = m.field1*2;
\r