[clang] [clang][sema] consolidate diags for incompatible_vector_* (PR #83609)
Farzon Lotfi via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 1 12:59:42 PST 2024
================
@@ -5241,8 +5241,8 @@ bool CheckVectorElementCallArgs(Sema *S, CallExpr *TheCall) {
// Note: if we get here one of the args is a scalar which
// requires a VectorSplat on Arg0 or Arg1
- S->Diag(BuiltinLoc, diag::err_vec_builtin_non_vector_all)
- << TheCall->getDirectCallee()
+ S->Diag(BuiltinLoc, diag::err_vec_builtin_non_vector)
+ << TheCall->getDirectCallee() << /*all args*/ true
----------------
farzonl wrote:
Originally this bool was determined by `(TheCall->getNumArgs() != 2)` Chris preferred the `all` language. So the comment here is to indicate that we are always going to go with all even when arg count is 2. I didn't want to use the same comment because a future editor might think there is a bug here.
https://github.com/llvm/llvm-project/pull/83609
More information about the cfe-commits
mailing list