fixes #159438 This patch adds `MatrixElementExpr`, a new AST node for HLSL matrix element and swizzle access (e.g. M._m00, M._11_22_33). It introduces a shared `ElementAccessExprBase` used by both matrix and vector swizzle expressions, updates Sema to parse and validate zero-based and one-based accessors, detects duplicates for l-value checks, and emits improved diagnostics. CodeGen is updated to lower scalar and multi-element accesses consistently, and full AST serialization, dumping, and tooling support is included. This implementation reflects the updated [RFC](https://github.com/llvm/wg-hlsl/pull/357/files) for HLSL matrix accessor semantics.
31 KiB
31 KiB