================
@@ -12591,6 +12592,19 @@ void Sema::CheckImplicitConversion(Expr *E, QualType 
T, SourceLocation CC,
   if (auto VecTy = dyn_cast<VectorType>(Target))
     Target = VecTy->getElementType().getTypePtr();
 
+  if (isa<ConstantMatrixType>(Source)) {
+    if (!isa<ConstantMatrixType>(Target)) {
+      return DiagnoseImpCast(*this, E, T, CC, 
diag::warn_impcast_matrix_scalar);
+    } else if (getLangOpts().HLSL &&
----------------
farzonl wrote:

no because its is now 
```cpp
if (isa<ConstantMatrixType>(Source)) {
    if (Target->isScalarType())
```

https://github.com/llvm/llvm-project/pull/168915
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to