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

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 28 09:00:19 PDT 2026


================

----------------
farzonl wrote:

```suggestion
  if (CanonicalType->isDependentType())
    return false;

  if (CanonicalType->isSizelessBuiltinType())
    return true;

  // Return false for incomplete types after skipping any incomplete array types
  // which are expressly allowed by the standard and thus our API.
  if (CanonicalType->isIncompleteType())
    return false;

  if (CanonicalType.hasAddressDiscriminatedPointerAuth())
    return false;

  // As an extension, Clang treats vector and Matrix types as Scalar types.
  if (CanonicalType->isScalarType() || CanonicalType->isVectorType() || CanonicalType->isMatrixType())
```

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


More information about the cfe-commits mailing list