[clang] [ParserHLSL] Attempt to parse HLSL annotations on Field Decls. (PR #96346)
Chris B via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 26 08:55:41 PDT 2024
================
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s -verify
+
+// expected-no-diagnostics
+
+struct MyBitFields {
+ unsigned int field1 : 3; // 3 bits for field1
+ unsigned int field2 : 4; // 4 bits for field2
+ int field3 : 5; // 5 bits for field3 (signed)
----------------
llvm-beanz wrote:
Can we verify the AST for these to make sure they are parsed as bitfield declarations rather than just making sure it doesn't produce errors?
https://github.com/llvm/llvm-project/pull/96346
More information about the cfe-commits
mailing list