@@ -5218,15 +5218,15 @@ bool CheckVectorElementCallArgs(Sema *S, CallExpr *TheCall) {
5218
5218
// Note: type promotion is intended to be handeled via the intrinsics
5219
5219
// and not the builtin itself.
5220
5220
S->Diag(TheCall->getBeginLoc(),
5221
- diag::err_vec_builtin_incompatible_vector_all )
5222
- << TheCall->getDirectCallee()
5221
+ diag::err_vec_builtin_incompatible_vector )
5222
+ << TheCall->getDirectCallee() << /*all args*/ true
5223
5223
<< SourceRange(A.get()->getBeginLoc(), B.get()->getEndLoc());
5224
5224
retValue = true;
5225
5225
}
5226
5226
if (VecTyA->getNumElements() != VecTyB->getNumElements()) {
5227
5227
// if we get here a HLSLVectorTruncation is needed.
5228
- S->Diag(BuiltinLoc, diag::err_vec_builtin_incompatible_vector_all )
5229
- << TheCall->getDirectCallee()
5228
+ S->Diag(BuiltinLoc, diag::err_vec_builtin_incompatible_vector )
5229
+ << TheCall->getDirectCallee() << /*all args*/ true
5230
5230
<< SourceRange(TheCall->getArg(0)->getBeginLoc(),
5231
5231
TheCall->getArg(1)->getEndLoc());
5232
5232
retValue = true;
@@ -5241,8 +5241,8 @@ bool CheckVectorElementCallArgs(Sema *S, CallExpr *TheCall) {
5241
5241
5242
5242
// Note: if we get here one of the args is a scalar which
5243
5243
// requires a VectorSplat on Arg0 or Arg1
5244
- S->Diag(BuiltinLoc, diag::err_vec_builtin_non_vector_all )
5245
- << TheCall->getDirectCallee()
5244
+ S->Diag(BuiltinLoc, diag::err_vec_builtin_non_vector )
5245
+ << TheCall->getDirectCallee() << /*all args*/ true
5246
5246
<< SourceRange(TheCall->getArg(0)->getBeginLoc(),
5247
5247
TheCall->getArg(1)->getEndLoc());
5248
5248
return true;
@@ -9472,15 +9472,15 @@ bool Sema::SemaBuiltinVSX(CallExpr *TheCall) {
9472
9472
if ((!Arg1Ty->isVectorType() && !Arg1Ty->isDependentType()) ||
9473
9473
(!Arg2Ty->isVectorType() && !Arg2Ty->isDependentType())) {
9474
9474
return Diag(BuiltinLoc, diag::err_vec_builtin_non_vector)
9475
- << TheCall->getDirectCallee()
9475
+ << TheCall->getDirectCallee() << /*isMorethantwoArgs*/ false
9476
9476
<< SourceRange(TheCall->getArg(0)->getBeginLoc(),
9477
9477
TheCall->getArg(1)->getEndLoc());
9478
9478
}
9479
9479
9480
9480
// Check the first two arguments are the same type.
9481
9481
if (!Context.hasSameUnqualifiedType(Arg1Ty, Arg2Ty)) {
9482
9482
return Diag(BuiltinLoc, diag::err_vec_builtin_incompatible_vector)
9483
- << TheCall->getDirectCallee()
9483
+ << TheCall->getDirectCallee() << /*isMorethantwoArgs*/ false
9484
9484
<< SourceRange(TheCall->getArg(0)->getBeginLoc(),
9485
9485
TheCall->getArg(1)->getEndLoc());
9486
9486
}
@@ -9516,7 +9516,7 @@ ExprResult Sema::SemaBuiltinShuffleVector(CallExpr *TheCall) {
9516
9516
if (!LHSType->isVectorType() || !RHSType->isVectorType())
9517
9517
return ExprError(
9518
9518
Diag(TheCall->getBeginLoc(), diag::err_vec_builtin_non_vector)
9519
- << TheCall->getDirectCallee()
9519
+ << TheCall->getDirectCallee() << /*isMorethantwoArgs*/ false
9520
9520
<< SourceRange(TheCall->getArg(0)->getBeginLoc(),
9521
9521
TheCall->getArg(1)->getEndLoc()));
9522
9522
@@ -9532,12 +9532,14 @@ ExprResult Sema::SemaBuiltinShuffleVector(CallExpr *TheCall) {
9532
9532
return ExprError(Diag(TheCall->getBeginLoc(),
9533
9533
diag::err_vec_builtin_incompatible_vector)
9534
9534
<< TheCall->getDirectCallee()
9535
+ << /*isMorethantwoArgs*/ false
9535
9536
<< SourceRange(TheCall->getArg(1)->getBeginLoc(),
9536
9537
TheCall->getArg(1)->getEndLoc()));
9537
9538
} else if (!Context.hasSameUnqualifiedType(LHSType, RHSType)) {
9538
9539
return ExprError(Diag(TheCall->getBeginLoc(),
9539
9540
diag::err_vec_builtin_incompatible_vector)
9540
9541
<< TheCall->getDirectCallee()
9542
+ << /*isMorethantwoArgs*/ false
9541
9543
<< SourceRange(TheCall->getArg(0)->getBeginLoc(),
9542
9544
TheCall->getArg(1)->getEndLoc()));
9543
9545
} else if (numElements != numResElements) {
0 commit comments