[clang] [clang][sema] consolidate diags for incompatible_vector_* (PR #83609)

Greg Roth via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 1 12:41:46 PST 2024


================
@@ -5218,15 +5218,15 @@ bool CheckVectorElementCallArgs(Sema *S, CallExpr *TheCall) {
         // Note: type promotion is intended to be handeled via the intrinsics
         //  and not the builtin itself.
         S->Diag(TheCall->getBeginLoc(),
-                diag::err_vec_builtin_incompatible_vector_all)
-            << TheCall->getDirectCallee()
+                diag::err_vec_builtin_incompatible_vector)
+            << TheCall->getDirectCallee() << /*all args*/ true
             << SourceRange(A.get()->getBeginLoc(), B.get()->getEndLoc());
         retValue = true;
       }
       if (VecTyA->getNumElements() != VecTyB->getNumElements()) {
         // if we get here a HLSLVectorTruncation is needed.
----------------
pow2clk wrote:

This comment seems inaccurate as we're not inserting a truncation, but failing.

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


More information about the cfe-commits mailing list