================
@@ -13073,9 +13073,12 @@ void Sema::CheckImplicitConversion(Expr *E, QualType 
T, SourceLocation CC,
       if (SourceMgr.isInSystemMacro(CC) || Target->isBooleanType())
         return;
 
+      const Type *OriginalTargetTy = Context.getCanonicalType(T).getTypePtr();
       return DiagnoseImpCast(*this, E, T, CC,
                              getLangOpts().CPlusPlus
                                  ? diag::err_impcast_complex_scalar
+                             : OriginalTargetTy->isVectorType()
+                                 ? diag::err_impcast_incompatible_type
----------------
Sirraide wrote:

Instead of nesting ternary expressions like this, could you move the new check 
into an if statement before this return statement here. Also, I believe just 
calling `T->isVectorType()` is enough.

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

Reply via email to