================
@@ -2790,6 +2790,73 @@ class ArraySubscriptExpr : public Expr {
}
};
+/// MatrixSingleSubscriptExpr - Matrix single subscript expression for the
+/// MatrixType extension when you want to get\set a vector from a Matrix.
+class MatrixSingleSubscriptExpr : public Expr {
+ enum { BASE, ROW_IDX, END_EXPR };
+ Stmt *SubExprs[END_EXPR];
+
+public:
+ /// matrix[row]
+ ///
+ /// \param Base The matrix expression.
+ /// \param RowIdx The row index expression.
+ /// \param T The type of the row (usually a vector type).
+ /// \param RBracketLoc Location of the closing ']'.
+ MatrixSingleSubscriptExpr(Expr *Base, Expr *RowIdx, QualType T,
+ SourceLocation RBracketLoc)
+ : Expr(MatrixSingleSubscriptExprClass, T,
+ Base->getValueKind(), // lvalue/rvalue follows the matrix base
+ OK_MatrixComponent) { // or OK_Ordinary/OK_VectorComponent if you
+ // prefer
----------------
hekota wrote:
Can you please explain the comment?
https://github.com/llvm/llvm-project/pull/170779
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits