@@ -1983,28 +1983,28 @@ checkMathBuiltinElementType(Sema &S, SourceLocation Loc, QualType ArgTy,
19831983 if (!ArgTy->getAs<VectorType>() &&
19841984 !ConstantMatrixType::isValidElementType(ArgTy)) {
19851985 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
19871987 << ArgTy;
19881988 }
19891989 break;
19901990 case Sema::EltwiseBuiltinArgTyRestriction::FloatTy:
19911991 if (!EltTy->isRealFloatingType()) {
19921992 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
19941994 << /* floating-point */ 1 << ArgTy;
19951995 }
19961996 break;
19971997 case Sema::EltwiseBuiltinArgTyRestriction::IntegerTy:
19981998 if (!EltTy->isIntegerType()) {
19991999 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
20012001 << /* no fp */ 0 << ArgTy;
20022002 }
20032003 break;
20042004 case Sema::EltwiseBuiltinArgTyRestriction::SignedIntOrFloatTy:
20052005 if (EltTy->isUnsignedIntegerType()) {
20062006 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
20082008 << /* or fp */ 1 << ArgTy;
20092009 }
20102010 break;
@@ -2856,7 +2856,7 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
28562856
28572857 if (ElTy.isNull() || !ElTy->isFloatingType()) {
28582858 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
28602860 << Arg->getType();
28612861 return ExprError();
28622862 }
@@ -2886,7 +2886,7 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
28862886
28872887 if (ElTy.isNull() || !ElTy->isIntegerType()) {
28882888 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
28902890 << Arg->getType();
28912891 return ExprError();
28922892 }
@@ -14800,7 +14800,7 @@ bool Sema::BuiltinNonDeterministicValue(CallExpr *TheCall) {
1480014800 if (!TyArg->isBuiltinType() && !TyArg->isVectorType())
1480114801 return Diag(TheCall->getArg(0)->getBeginLoc(),
1480214802 diag::err_builtin_invalid_arg_type)
14803- << 1 << /* vector, */ 3 << /* integer */ 1 << /* fp */ 1 << TyArg;
14803+ << 1 << /* vector, */ 4 << /* integer */ 1 << /* fp */ 1 << TyArg;
1480414804
1480514805 TheCall->setType(TyArg);
1480614806 return false;
@@ -14819,7 +14819,8 @@ ExprResult Sema::BuiltinMatrixTranspose(CallExpr *TheCall,
1481914819 auto *MType = Matrix->getType()->getAs<ConstantMatrixType>();
1482014820 if (!MType) {
1482114821 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();
1482314824 return ExprError();
1482414825 }
1482514826
@@ -14891,15 +14892,15 @@ ExprResult Sema::BuiltinMatrixColumnMajorLoad(CallExpr *TheCall,
1489114892 QualType ElementTy;
1489214893 if (!PtrTy) {
1489314894 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
1489514896 << PtrExpr->getType();
1489614897 ArgError = true;
1489714898 } else {
1489814899 ElementTy = PtrTy->getPointeeType().getUnqualifiedType();
1489914900
1490014901 if (!ConstantMatrixType::isValidElementType(ElementTy)) {
1490114902 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
1490314904 << /* no fp */ 0 << PtrExpr->getType();
1490414905 ArgError = true;
1490514906 }
@@ -15000,7 +15001,7 @@ ExprResult Sema::BuiltinMatrixColumnMajorStore(CallExpr *TheCall,
1500015001 auto *MatrixTy = MatrixExpr->getType()->getAs<ConstantMatrixType>();
1500115002 if (!MatrixTy) {
1500215003 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();
1500415005 ArgError = true;
1500515006 }
1500615007
@@ -15020,7 +15021,7 @@ ExprResult Sema::BuiltinMatrixColumnMajorStore(CallExpr *TheCall,
1502015021 auto *PtrTy = PtrExpr->getType()->getAs<PointerType>();
1502115022 if (!PtrTy) {
1502215023 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
1502415025 << PtrExpr->getType();
1502515026 ArgError = true;
1502615027 } else {
0 commit comments