diff options
-rw-r--r-- | lib/AST/Type.cpp | 2 | ||||
-rw-r--r-- | lib/Analysis/PrintfFormatString.cpp | 2 | ||||
-rw-r--r-- | lib/Checker/CheckSecuritySyntaxOnly.cpp | 4 | ||||
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 4 | ||||
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 6 | ||||
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 4 | ||||
-rw-r--r-- | test/Sema/ext_vector_casts.c | 2 |
8 files changed, 13 insertions, 13 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 11fd42d62a..a8ead6d46b 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -576,8 +576,6 @@ bool Type::hasFloatingRepresentation() const { bool Type::isRealFloatingType() const { if (const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType)) return BT->isFloatingPoint(); - if (const VectorType *VT = dyn_cast<VectorType>(CanonicalType)) - return VT->getElementType()->isRealFloatingType(); return false; } diff --git a/lib/Analysis/PrintfFormatString.cpp b/lib/Analysis/PrintfFormatString.cpp index 8ad1d21312..558d38af0c 100644 --- a/lib/Analysis/PrintfFormatString.cpp +++ b/lib/Analysis/PrintfFormatString.cpp @@ -757,7 +757,7 @@ bool FormatSpecifier::fixType(QualType QT) { HasPlusPrefix = 0; } // Test for Floating type first as LongDouble can pass isUnsignedIntegerType - else if (QT->isFloatingType()) { + else if (QT->isRealFloatingType()) { CS.setKind(ConversionSpecifier::fArg); } else if (QT->isPointerType()) { diff --git a/lib/Checker/CheckSecuritySyntaxOnly.cpp b/lib/Checker/CheckSecuritySyntaxOnly.cpp index 74e12b18a8..af85c2faee 100644 --- a/lib/Checker/CheckSecuritySyntaxOnly.cpp +++ b/lib/Checker/CheckSecuritySyntaxOnly.cpp @@ -191,8 +191,8 @@ void WalkAST::CheckLoopConditionForFloat(const ForStmt *FS) { const DeclRefExpr *drRHS = dyn_cast<DeclRefExpr>(B->getRHS()->IgnoreParens()); // Does at least one of the variables have a floating point type? - drLHS = drLHS && drLHS->getType()->isFloatingType() ? drLHS : NULL; - drRHS = drRHS && drRHS->getType()->isFloatingType() ? drRHS : NULL; + drLHS = drLHS && drLHS->getType()->isRealFloatingType() ? drLHS : NULL; + drRHS = drRHS && drRHS->getType()->isRealFloatingType() ? drRHS : NULL; if (!drLHS && !drRHS) return; diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index fb3bec5ad8..f73cfa4af6 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -1646,7 +1646,7 @@ CGObjCCommonMac::EmitLegacyMessageSend(CodeGen::CodeGenFunction &CGF, if (CGM.ReturnTypeUsesSret(FnInfo)) { Fn = (ObjCABI == 2) ? ObjCTypes.getSendStretFn2(IsSuper) : ObjCTypes.getSendStretFn(IsSuper); - } else if (ResultType->isFloatingType()) { + } else if (ResultType->isRealFloatingType()) { if (ObjCABI == 2) { if (const BuiltinType *BT = ResultType->getAs<BuiltinType>()) { BuiltinType::Kind k = BT->getKind(); @@ -5200,7 +5200,7 @@ CodeGen::RValue CGObjCNonFragileABIMac::EmitMessageSend( Fn = ObjCTypes.getMessageSendStretFixupFn(); Name += "objc_msgSend_stret_fixup"; } - } else if (!IsSuper && ResultType->isFloatingType()) { + } else if (!IsSuper && ResultType->isRealFloatingType()) { if (ResultType->isSpecificBuiltinType(BuiltinType::LongDouble)) { Fn = ObjCTypes.getMessageSendFpretFixupFn(); Name += "objc_msgSend_fpret_fixup"; diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 07b0c26403..0e61f1d23a 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -1799,7 +1799,7 @@ Sema::PerformImplicitConversion(Expr *&From, QualType ToType, break; case ICK_Floating_Integral: - if (ToType->isFloatingType()) + if (ToType->isRealFloatingType()) ImpCastExprToType(From, ToType, CastExpr::CK_IntegralToFloating); else ImpCastExprToType(From, ToType, CastExpr::CK_FloatingToIntegral); diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index b4133e8b4a..61d42f083c 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -1015,14 +1015,14 @@ Sema::IsStandardConversion(Expr* From, QualType ToType, // Complex-real conversions (C99 6.3.1.7) SCS.Second = ICK_Complex_Real; FromType = ToType.getUnqualifiedType(); - } else if (FromType->isFloatingType() && ToType->isFloatingType()) { + } else if (FromType->isRealFloatingType() && ToType->isRealFloatingType()) { // Floating point conversions (C++ 4.8). SCS.Second = ICK_Floating_Conversion; FromType = ToType.getUnqualifiedType(); - } else if ((FromType->isFloatingType() && + } else if ((FromType->isRealFloatingType() && ToType->isIntegralType(Context) && !ToType->isBooleanType()) || (FromType->isIntegralOrEnumerationType() && - ToType->isFloatingType())) { + ToType->isRealFloatingType())) { // Floating-integral conversions (C++ 4.9). SCS.Second = ICK_Floating_Integral; FromType = ToType.getUnqualifiedType(); diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 735b069b42..738fc55823 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -1516,14 +1516,14 @@ Sema::OwningStmtResult Sema::ActOnAsmStmt(SourceLocation AsmLoc, if (InTy->isIntegerType() || InTy->isPointerType()) InputDomain = AD_Int; - else if (InTy->isFloatingType()) + else if (InTy->isRealFloatingType()) InputDomain = AD_FP; else InputDomain = AD_Other; if (OutTy->isIntegerType() || OutTy->isPointerType()) OutputDomain = AD_Int; - else if (OutTy->isFloatingType()) + else if (OutTy->isRealFloatingType()) OutputDomain = AD_FP; else OutputDomain = AD_Other; diff --git a/test/Sema/ext_vector_casts.c b/test/Sema/ext_vector_casts.c index d2976238c0..be09903e00 100644 --- a/test/Sema/ext_vector_casts.c +++ b/test/Sema/ext_vector_casts.c @@ -43,3 +43,5 @@ static void test() { ivec4 |= ivec4; ivec4 += ptr; // expected-error {{can't convert between vector values of different size ('int4' and 'int *')}} } + +typedef __attribute__(( ext_vector_type(2) )) float2 vecfloat2; // expected-error{{invalid vector type 'float2'}} |