[clang] [HLSL][Matrix] introduce MatrixElementExpr as accessor and swizzle operator (PR #171225)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 22 11:08:45 PST 2026


================
@@ -4472,6 +4543,59 @@ void ExtVectorElementExpr::getEncodedElementAccess(
   }
 }
 
+void MatrixElementExpr::getEncodedElementAccess(
----------------
farzonl wrote:

done see `ForEachMatrixAccessorIndex`. I may have gotten a little overzealous and tried to also abstract the HLSL specific parsing parts to  `GetHLSLMatrixAccessorFormat` But I don't knoiw how useful that is is because we can't access LangOpts in an Expr. Still like the formating in a seperate helper because it keeps things cleaner so left it that way.

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


More information about the cfe-commits mailing list