aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaCast.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaCast.cpp')
-rw-r--r--clang/lib/Sema/SemaCast.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaCast.cpp b/clang/lib/Sema/SemaCast.cpp
index d347975..8a9ee1a 100644
--- a/clang/lib/Sema/SemaCast.cpp
+++ b/clang/lib/Sema/SemaCast.cpp
@@ -2648,6 +2648,13 @@ void CastOperation::CheckCXXCStyleCast(bool FunctionalStyle,
return;
}
+ if (DestType->getAs<MatrixType>() ||
+ SrcExpr.get()->getType()->getAs<MatrixType>()) {
+ if (Self.CheckMatrixCast(OpRange, DestType, SrcExpr.get()->getType(), Kind))
+ SrcExpr = ExprError();
+ return;
+ }
+
// AltiVec vector initialization with a single literal.
if (const VectorType *vecTy = DestType->getAs<VectorType>())
if (vecTy->getVectorKind() == VectorType::AltiVecVector