@@ -63,16 +63,6 @@ static bool CheckAllArgTypesAreCorrect(
6363 return false ;
6464}
6565
66- static bool CheckAllArgTypesAreCorrect (
67- Sema *S, CallExpr *TheCall,
68- llvm::function_ref<bool (Sema *, SourceLocation, int , QualType)> Check) {
69- return CheckAllArgTypesAreCorrect (
70- S, TheCall,
71- SmallVector<
72- llvm::function_ref<bool (Sema *, SourceLocation, int , QualType)>, 4 >(
73- TheCall->getNumArgs (), Check));
74- }
75-
7666static bool CheckFloatOrHalfRepresentation (Sema *S, SourceLocation Loc,
7767 int ArgOrdinal,
7868 clang::QualType PassedType) {
@@ -90,9 +80,7 @@ static bool CheckFloatOrHalfRepresentation(Sema *S, SourceLocation Loc,
9080static bool CheckFloatOrHalfScalarRepresentation (Sema *S, SourceLocation Loc,
9181 int ArgOrdinal,
9282 clang::QualType PassedType) {
93- const auto *VecTy = PassedType->getAs <VectorType>();
94-
95- if (VecTy || (!PassedType->isHalfType () && !PassedType->isFloat32Type ()))
83+ if (!PassedType->isHalfType () && !PassedType->isFloat32Type ())
9684 return S->Diag (Loc, diag::err_builtin_invalid_arg_type)
9785 << ArgOrdinal << /* scalar */ 1 << /* no int */ 0
9886 << /* half or float */ 2 << PassedType;
@@ -300,14 +288,6 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(const TargetInfo &TI,
300288 llvm::ArrayRef (ChecksArr)))
301289 return true ;
302290
303- ExprResult C = TheCall->getArg (2 );
304- QualType ArgTyC = C.get ()->getType ();
305- if (!ArgTyC->isFloatingType ()) {
306- SemaRef.Diag (C.get ()->getBeginLoc (), diag::err_builtin_invalid_arg_type)
307- << 3 << /* scalar*/ 5 << /* no int */ 0 << /* fp */ 1 << ArgTyC;
308- return true ;
309- }
310-
311291 QualType RetTy = TheCall->getArg (0 )->getType ();
312292 TheCall->setType (RetTy);
313293 break ;
0 commit comments