@@ -1983,28 +1983,28 @@ checkMathBuiltinElementType(Sema &S, SourceLocation Loc, QualType ArgTy,
1983
1983
if (!ArgTy->getAs<VectorType>() &&
1984
1984
!ConstantMatrixType::isValidElementType(ArgTy)) {
1985
1985
return S.Diag(Loc, diag::err_builtin_invalid_arg_type)
1986
- << ArgOrdinal << /* vector, */ 3 << /* integer */ 1 << /* fp */ 1
1986
+ << ArgOrdinal << /* vector, */ 4 << /* integer */ 1 << /* fp */ 1
1987
1987
<< ArgTy;
1988
1988
}
1989
1989
break;
1990
1990
case Sema::EltwiseBuiltinArgTyRestriction::FloatTy:
1991
1991
if (!EltTy->isRealFloatingType()) {
1992
1992
return S.Diag(Loc, diag::err_builtin_invalid_arg_type)
1993
- << ArgOrdinal << /* scalar or vector */ 5 << /* no int */ 0
1993
+ << ArgOrdinal << /* scalar or vector */ 6 << /* no int */ 0
1994
1994
<< /* floating-point */ 1 << ArgTy;
1995
1995
}
1996
1996
break;
1997
1997
case Sema::EltwiseBuiltinArgTyRestriction::IntegerTy:
1998
1998
if (!EltTy->isIntegerType()) {
1999
1999
return S.Diag(Loc, diag::err_builtin_invalid_arg_type)
2000
- << ArgOrdinal << /* scalar or vector */ 5 << /* integer */ 1
2000
+ << ArgOrdinal << /* scalar or vector */ 6 << /* integer */ 1
2001
2001
<< /* no fp */ 0 << ArgTy;
2002
2002
}
2003
2003
break;
2004
2004
case Sema::EltwiseBuiltinArgTyRestriction::SignedIntOrFloatTy:
2005
2005
if (EltTy->isUnsignedIntegerType()) {
2006
2006
return S.Diag(Loc, diag::err_builtin_invalid_arg_type)
2007
- << 1 << /* scalar or vector */ 5 << /* signed int */ 2
2007
+ << 1 << /* scalar or vector */ 6 << /* signed int */ 2
2008
2008
<< /* or fp */ 1 << ArgTy;
2009
2009
}
2010
2010
break;
@@ -2858,7 +2858,7 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
2858
2858
2859
2859
if (ElTy.isNull() || !ElTy->isFloatingType()) {
2860
2860
Diag(Arg->getBeginLoc(), diag::err_builtin_invalid_arg_type)
2861
- << 1 << /* vector of */ 4 << /* no int */ 0 << /* fp */ 1
2861
+ << 1 << /* vector of */ 5 << /* no int */ 0 << /* fp */ 1
2862
2862
<< Arg->getType();
2863
2863
return ExprError();
2864
2864
}
@@ -2888,7 +2888,7 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
2888
2888
2889
2889
if (ElTy.isNull() || !ElTy->isIntegerType()) {
2890
2890
Diag(Arg->getBeginLoc(), diag::err_builtin_invalid_arg_type)
2891
- << 1 << /* vector of */ 4 << /* int */ 1 << /* no fp */ 0
2891
+ << 1 << /* vector of */ 5 << /* int */ 1 << /* no fp */ 0
2892
2892
<< Arg->getType();
2893
2893
return ExprError();
2894
2894
}
@@ -15412,7 +15412,7 @@ bool Sema::BuiltinNonDeterministicValue(CallExpr *TheCall) {
15412
15412
if (!TyArg->isBuiltinType() && !TyArg->isVectorType())
15413
15413
return Diag(TheCall->getArg(0)->getBeginLoc(),
15414
15414
diag::err_builtin_invalid_arg_type)
15415
- << 1 << /* vector, */ 3 << /* integer */ 1 << /* fp */ 1 << TyArg;
15415
+ << 1 << /* vector, */ 4 << /* integer */ 1 << /* fp */ 1 << TyArg;
15416
15416
15417
15417
TheCall->setType(TyArg);
15418
15418
return false;
@@ -15431,7 +15431,8 @@ ExprResult Sema::BuiltinMatrixTranspose(CallExpr *TheCall,
15431
15431
auto *MType = Matrix->getType()->getAs<ConstantMatrixType>();
15432
15432
if (!MType) {
15433
15433
Diag(Matrix->getBeginLoc(), diag::err_builtin_invalid_arg_type)
15434
- << 1 << 0 << /* matrix ty */ 5 << /* no fp */ 0 << Matrix->getType();
15434
+ << 1 << /* matrix */ 3 << /* no int */ 0 << /* no fp */ 0
15435
+ << Matrix->getType();
15435
15436
return ExprError();
15436
15437
}
15437
15438
@@ -15503,15 +15504,15 @@ ExprResult Sema::BuiltinMatrixColumnMajorLoad(CallExpr *TheCall,
15503
15504
QualType ElementTy;
15504
15505
if (!PtrTy) {
15505
15506
Diag(PtrExpr->getBeginLoc(), diag::err_builtin_invalid_arg_type)
15506
- << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 6 << /* no fp */ 0
15507
+ << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 5 << /* no fp */ 0
15507
15508
<< PtrExpr->getType();
15508
15509
ArgError = true;
15509
15510
} else {
15510
15511
ElementTy = PtrTy->getPointeeType().getUnqualifiedType();
15511
15512
15512
15513
if (!ConstantMatrixType::isValidElementType(ElementTy)) {
15513
15514
Diag(PtrExpr->getBeginLoc(), diag::err_builtin_invalid_arg_type)
15514
- << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 6
15515
+ << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 5
15515
15516
<< /* no fp */ 0 << PtrExpr->getType();
15516
15517
ArgError = true;
15517
15518
}
@@ -15612,7 +15613,7 @@ ExprResult Sema::BuiltinMatrixColumnMajorStore(CallExpr *TheCall,
15612
15613
auto *MatrixTy = MatrixExpr->getType()->getAs<ConstantMatrixType>();
15613
15614
if (!MatrixTy) {
15614
15615
Diag(MatrixExpr->getBeginLoc(), diag::err_builtin_invalid_arg_type)
15615
- << 1 << 0 << /* matrix ty */ 5 << 0 << MatrixExpr->getType();
15616
+ << 1 << /* matrix ty */ 3 << 0 << 0 << MatrixExpr->getType();
15616
15617
ArgError = true;
15617
15618
}
15618
15619
@@ -15632,7 +15633,7 @@ ExprResult Sema::BuiltinMatrixColumnMajorStore(CallExpr *TheCall,
15632
15633
auto *PtrTy = PtrExpr->getType()->getAs<PointerType>();
15633
15634
if (!PtrTy) {
15634
15635
Diag(PtrExpr->getBeginLoc(), diag::err_builtin_invalid_arg_type)
15635
- << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 6 << 0
15636
+ << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 5 << 0
15636
15637
<< PtrExpr->getType();
15637
15638
ArgError = true;
15638
15639
} else {
0 commit comments