@@ -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
}
@@ -14800,7 +14800,7 @@ bool Sema::BuiltinNonDeterministicValue(CallExpr *TheCall) {
14800
14800
if (!TyArg->isBuiltinType() && !TyArg->isVectorType())
14801
14801
return Diag(TheCall->getArg(0)->getBeginLoc(),
14802
14802
diag::err_builtin_invalid_arg_type)
14803
- << 1 << /* vector, */ 3 << /* integer */ 1 << /* fp */ 1 << TyArg;
14803
+ << 1 << /* vector, */ 4 << /* integer */ 1 << /* fp */ 1 << TyArg;
14804
14804
14805
14805
TheCall->setType(TyArg);
14806
14806
return false;
@@ -14819,7 +14819,8 @@ ExprResult Sema::BuiltinMatrixTranspose(CallExpr *TheCall,
14819
14819
auto *MType = Matrix->getType()->getAs<ConstantMatrixType>();
14820
14820
if (!MType) {
14821
14821
Diag(Matrix->getBeginLoc(), diag::err_builtin_invalid_arg_type)
14822
- << 1 << 0 << /* matrix ty */ 5 << /* no fp */ 0 << Matrix->getType();
14822
+ << 1 << /* matrix */ 3 << /* no int */ 0 << /* no fp */ 0
14823
+ << Matrix->getType();
14823
14824
return ExprError();
14824
14825
}
14825
14826
@@ -14891,15 +14892,15 @@ ExprResult Sema::BuiltinMatrixColumnMajorLoad(CallExpr *TheCall,
14891
14892
QualType ElementTy;
14892
14893
if (!PtrTy) {
14893
14894
Diag(PtrExpr->getBeginLoc(), diag::err_builtin_invalid_arg_type)
14894
- << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 6 << /* no fp */ 0
14895
+ << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 5 << /* no fp */ 0
14895
14896
<< PtrExpr->getType();
14896
14897
ArgError = true;
14897
14898
} else {
14898
14899
ElementTy = PtrTy->getPointeeType().getUnqualifiedType();
14899
14900
14900
14901
if (!ConstantMatrixType::isValidElementType(ElementTy)) {
14901
14902
Diag(PtrExpr->getBeginLoc(), diag::err_builtin_invalid_arg_type)
14902
- << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 6
14903
+ << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 5
14903
14904
<< /* no fp */ 0 << PtrExpr->getType();
14904
14905
ArgError = true;
14905
14906
}
@@ -15000,7 +15001,7 @@ ExprResult Sema::BuiltinMatrixColumnMajorStore(CallExpr *TheCall,
15000
15001
auto *MatrixTy = MatrixExpr->getType()->getAs<ConstantMatrixType>();
15001
15002
if (!MatrixTy) {
15002
15003
Diag(MatrixExpr->getBeginLoc(), diag::err_builtin_invalid_arg_type)
15003
- << 1 << 0 << /* matrix ty */ 5 << 0 << MatrixExpr->getType();
15004
+ << 1 << /* matrix ty */ 3 << 0 << 0 << MatrixExpr->getType();
15004
15005
ArgError = true;
15005
15006
}
15006
15007
@@ -15020,7 +15021,7 @@ ExprResult Sema::BuiltinMatrixColumnMajorStore(CallExpr *TheCall,
15020
15021
auto *PtrTy = PtrExpr->getType()->getAs<PointerType>();
15021
15022
if (!PtrTy) {
15022
15023
Diag(PtrExpr->getBeginLoc(), diag::err_builtin_invalid_arg_type)
15023
- << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 6 << 0
15024
+ << PtrArgIdx + 1 << 0 << /* pointer to element ty */ 5 << 0
15024
15025
<< PtrExpr->getType();
15025
15026
ArgError = true;
15026
15027
} else {
0 commit comments