[clang] [Clang][Sema] Improve shuffle vector size mismatch diagnostic (PR #223768)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 15 11:24:50 PDT 2026


================
@@ -6603,7 +6603,7 @@ ExprResult Sema::BuiltinShuffleVector(CallExpr *TheCall) {
 
       if (RHSVecType->getNumElements() != NumElements)
         return ExprError(Diag(TheCall->getBeginLoc(),
-                              diag::err_vec_builtin_incompatible_vector)
+                              diag::err_shufflevector_incompatible_vector)
----------------
jhuber6 wrote:

Yeah, we lose the name but I'm thinking that the diagnostic should point to the arguments and function in question. Honestly I kind of wish a lot of these error kinds were made more generic, a lot of them could be merged. Maybe a cleanup for another day.

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


More information about the cfe-commits mailing list