summaryrefslogtreecommitdiff
path: root/clang/test/ParserHLSL/bitfields.hlsl
diff options
context:
space:
mode:
authorMingming Liu <mingmingl@google.com>2025-09-10 15:25:31 -0700
committerGitHub <noreply@github.com>2025-09-10 15:25:31 -0700
commit1417dafa1db9cb1b2b09438aa9f53ea5ab6e36e2 (patch)
tree57f4b1f313c8cf74eed8819870f39c36ea263c68 /clang/test/ParserHLSL/bitfields.hlsl
parent898b813bc8a6d0276bf0f4769f5f2f64b34e632d (diff)
parentb8cefcb601ddaa18482555c4ff363c01a270c2fe (diff)
Merge branch 'main' into users/mingmingl-llvm/samplefdo-profile-formatusers/mingmingl-llvm/samplefdo-profile-format
Diffstat (limited to 'clang/test/ParserHLSL/bitfields.hlsl')
-rw-r--r--clang/test/ParserHLSL/bitfields.hlsl62
1 files changed, 31 insertions, 31 deletions
diff --git a/clang/test/ParserHLSL/bitfields.hlsl b/clang/test/ParserHLSL/bitfields.hlsl
index 307d1143a068..3c8a9e012fdb 100644
--- a/clang/test/ParserHLSL/bitfields.hlsl
+++ b/clang/test/ParserHLSL/bitfields.hlsl
@@ -1,31 +1,31 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -ast-dump -x hlsl -o - %s | FileCheck %s
-
-
-struct MyBitFields {
- // CHECK: FieldDecl 0x{{[0-9a-f]+}} <line:9:3, col:25> col:16 referenced field1 'unsigned int'
- // CHECK:-ConstantExpr 0x{{[0-9a-f]+}} <col:25> 'int'
- // CHECK:-value: Int 3
- // CHECK:-IntegerLiteral 0x{{[0-9a-f]+}} <col:25> 'int' 3
- unsigned int field1 : 3; // 3 bits for field1
-
- // CHECK:FieldDecl 0x{{[0-9a-f]+}} <line:15:3, col:25> col:16 referenced field2 'unsigned int'
- // CHECK:-ConstantExpr 0x{{[0-9a-f]+}} <col:25> 'int'
- // CHECK:-value: Int 4
- // CHECK:-IntegerLiteral 0x{{[0-9a-f]+}} <col:25> 'int' 4
- unsigned int field2 : 4; // 4 bits for field2
-
- // CHECK:FieldDecl 0x{{[0-9a-f]+}} <line:21:3, col:16> col:7 field3 'int'
- // CHECK:-ConstantExpr 0x{{[0-9a-f]+}} <col:16> 'int'
- // CHECK:-value: Int 5
- // CHECK:-IntegerLiteral 0x{{[0-9a-f]+}} <col:16> 'int' 5
- int field3 : 5; // 5 bits for field3 (signed)
-};
-
-
-
-[numthreads(1,1,1)]
-void main() {
- MyBitFields m;
- m.field1 = 4;
- m.field2 = m.field1*2;
-} \ No newline at end of file
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -ast-dump -x hlsl -o - %s | FileCheck %s
+
+
+struct MyBitFields {
+ // CHECK: FieldDecl 0x{{[0-9a-f]+}} <line:9:3, col:25> col:16 referenced field1 'unsigned int'
+ // CHECK:-ConstantExpr 0x{{[0-9a-f]+}} <col:25> 'int'
+ // CHECK:-value: Int 3
+ // CHECK:-IntegerLiteral 0x{{[0-9a-f]+}} <col:25> 'int' 3
+ unsigned int field1 : 3; // 3 bits for field1
+
+ // CHECK:FieldDecl 0x{{[0-9a-f]+}} <line:15:3, col:25> col:16 referenced field2 'unsigned int'
+ // CHECK:-ConstantExpr 0x{{[0-9a-f]+}} <col:25> 'int'
+ // CHECK:-value: Int 4
+ // CHECK:-IntegerLiteral 0x{{[0-9a-f]+}} <col:25> 'int' 4
+ unsigned int field2 : 4; // 4 bits for field2
+
+ // CHECK:FieldDecl 0x{{[0-9a-f]+}} <line:21:3, col:16> col:7 field3 'int'
+ // CHECK:-ConstantExpr 0x{{[0-9a-f]+}} <col:16> 'int'
+ // CHECK:-value: Int 5
+ // CHECK:-IntegerLiteral 0x{{[0-9a-f]+}} <col:16> 'int' 5
+ int field3 : 5; // 5 bits for field3 (signed)
+};
+
+
+
+[numthreads(1,1,1)]
+void main() {
+ MyBitFields m;
+ m.field1 = 4;
+ m.field2 = m.field1*2;
+}