[clang] [HLSL][Matrix] Add support for Matrix element and trunc Casts (PR #168915)

Chris B via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 20 10:30:50 PST 2025


================
@@ -11773,6 +11773,10 @@ bool VectorExprEvaluator::VisitCastExpr(const CastExpr *E) {
       Elements.push_back(Val.getVectorElt(I));
     return Success(Elements, E);
   }
+  case CK_HLSLMatrixTruncation: {
+    // TODO: support Expr Constant for Matrix Truncation
----------------
llvm-beanz wrote:

Can you file an issue for these and refer to it in the comment?

```suggestion
    // TODO: Add support Expr Constant for Matrix Truncation.
```
nit: Complete sentences and punctuation for comments please (see: https://llvm.org/docs/CodingStandards.html#commenting).

https://github.com/llvm/llvm-project/pull/168915


More information about the cfe-commits mailing list