[clang] [Clang] Make matrix type trivially copyable (PR #193634)

via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 28 10:50:40 PDT 2026


================
@@ -2902,6 +2867,10 @@ static bool isTriviallyCopyableTypeImpl(const QualType &type,
     return isTriviallyCopyableTypeImpl(Context.getBaseElementType(type),
                                        Context, IsCopyConstructible);
 
+  if (type->isMatrixType())
+    return isTriviallyCopyableTypeImpl(Context.getMatrixBaseElementType(type),
+                                       Context, IsCopyConstructible);
----------------
joaosaffran wrote:

Vectors seems to check the inner element first: https://github.com/joaosaffran/llvm-project/blob/4c2834dc79a7b8702c16938a4c6d094540424c11/clang/lib/AST/Type.cpp#L2866

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


More information about the cfe-commits mailing list