QualType LHSType = LHS.get()->getType().getUnqualifiedType();
QualType RHSType = RHS.get()->getType().getUnqualifiedType();
- const BuiltinType *LHSVecType = LHSType->getAs<BuiltinType>();
- const BuiltinType *RHSVecType = RHSType->getAs<BuiltinType>();
-
unsigned DiagID = diag::err_typecheck_invalid_operands;
if ((OperationKind == ACK_Arithmetic) &&
- (LHSVecType->isSVEBool() || RHSVecType->isSVEBool())) {
+ (LHSType->castAs<BuiltinType>()->isSVEBool() ||
+ RHSType->castAs<BuiltinType>()->isSVEBool())) {
Diag(Loc, DiagID) << LHSType << RHSType << LHS.get()->getSourceRange()
<< RHS.get()->getSourceRange();
return QualType();