@@ -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;
@@ -2856,7 +2856,7 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
2856
2856
2857
2857
if (ElTy.isNull() || !ElTy->isFloatingType()) {
2858
2858
Diag(Arg->getBeginLoc(), diag::err_builtin_invalid_arg_type)
2859
- << 1 << /* vector of */ 4 << /* no int */ 0 << /* fp */ 1
2859
+ << 1 << /* vector of */ 5 << /* no int */ 0 << /* fp */ 1
2860
2860
<< Arg->getType();
2861
2861
return ExprError();
2862
2862
}
@@ -2886,7 +2886,7 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
2886
2886
2887
2887
if (ElTy.isNull() || !ElTy->isIntegerType()) {
2888
2888
Diag(Arg->getBeginLoc(), diag::err_builtin_invalid_arg_type)
2889
- << 1 << /* vector of */ 4 << /* int */ 1 << /* no fp */ 0
2889
+ << 1 << /* vector of */ 5 << /* int */ 1 << /* no fp */ 0
2890
2890
<< Arg->getType();
2891
2891
return ExprError();
2892
2892
}
@@ -15349,7 +15349,7 @@ bool Sema::BuiltinNonDeterministicValue(CallExpr *TheCall) {
15349
15349
if (!TyArg->isBuiltinType() && !TyArg->isVectorType())
15350
15350
return Diag(TheCall->getArg(0)->getBeginLoc(),
15351
15351
diag::err_builtin_invalid_arg_type)
15352
- << 1 << /* vector, */ 3 << /* integer */ 1 << /* fp */ 1 << TyArg;
15352
+ << 1 << /* vector, */ 4 << /* integer */ 1 << /* fp */ 1 << TyArg;
15353
15353
15354
15354
TheCall->setType(TyArg);
15355
15355
return false;
@@ -15368,7 +15368,8 @@ ExprResult Sema::BuiltinMatrixTranspose(CallExpr *TheCall,
15368
15368
auto *MType = Matrix->getType()->getAs<ConstantMatrixType>();
15369
15369
if (!MType) {
15370
15370
Diag(Matrix->getBeginLoc(), diag::err_builtin_invalid_arg_type)
15371
- << 1 << 0 << /* matrix ty */ 5 << /* no fp */ 0 << Matrix->getType();
15371
+ << 1 << /* matrix */ 3 << /* no int */ 0 << /* no fp */ 0
15372
+ << Matrix->getType();
15372
15373
return ExprError();
15373
15374
}
15374
15375
@@ -15440,15 +15441,15 @@ ExprResult Sema::BuiltinMatrixColumnMajorLoad(CallExpr *TheCall,
15440
15441
QualType ElementTy;
15441
15442
if (!PtrTy) {
15442
15443
Diag(PtrExpr->getBeginLoc(), diag::err_builtin_invalid_arg_type)
15443
- << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 6 << /* no fp */ 0
15444
+ << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 5 << /* no fp */ 0
15444
15445
<< PtrExpr->getType();
15445
15446
ArgError = true;
15446
15447
} else {
15447
15448
ElementTy = PtrTy->getPointeeType().getUnqualifiedType();
15448
15449
15449
15450
if (!ConstantMatrixType::isValidElementType(ElementTy)) {
15450
15451
Diag(PtrExpr->getBeginLoc(), diag::err_builtin_invalid_arg_type)
15451
- << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 6
15452
+ << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 5
15452
15453
<< /* no fp */ 0 << PtrExpr->getType();
15453
15454
ArgError = true;
15454
15455
}
@@ -15549,7 +15550,7 @@ ExprResult Sema::BuiltinMatrixColumnMajorStore(CallExpr *TheCall,
15549
15550
auto *MatrixTy = MatrixExpr->getType()->getAs<ConstantMatrixType>();
15550
15551
if (!MatrixTy) {
15551
15552
Diag(MatrixExpr->getBeginLoc(), diag::err_builtin_invalid_arg_type)
15552
- << 1 << 0 << /* matrix ty */ 5 << 0 << MatrixExpr->getType();
15553
+ << 1 << /* matrix ty */ 3 << 0 << 0 << MatrixExpr->getType();
15553
15554
ArgError = true;
15554
15555
}
15555
15556
@@ -15569,7 +15570,7 @@ ExprResult Sema::BuiltinMatrixColumnMajorStore(CallExpr *TheCall,
15569
15570
auto *PtrTy = PtrExpr->getType()->getAs<PointerType>();
15570
15571
if (!PtrTy) {
15571
15572
Diag(PtrExpr->getBeginLoc(), diag::err_builtin_invalid_arg_type)
15572
- << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 6 << 0
15573
+ << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 5 << 0
15573
15574
<< PtrExpr->getType();
15574
15575
ArgError = true;
15575
15576
} else {
0 commit comments