summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp5
-rw-r--r--clang/lib/Sema/SemaOverload.cpp5
2 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index eb66d9d6c01..e5c8e973c53 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -4626,7 +4626,7 @@ Sema::CheckAssignmentConstraints(QualType lhsType, QualType rhsType) {
if (lhsType->isExtVectorType()) {
if (rhsType->isExtVectorType())
return lhsType == rhsType ? Compatible : Incompatible;
- if (!rhsType->isVectorType() && rhsType->isArithmeticType())
+ if (rhsType->isArithmeticType())
return Compatible;
}
@@ -6511,7 +6511,8 @@ Action::OwningExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc,
resultType = Input->getType();
if (resultType->isDependentType())
break;
- if (resultType->isArithmeticType()) // C99 6.5.3.3p1
+ if (resultType->isArithmeticType() || // C99 6.5.3.3p1
+ resultType->isVectorType())
break;
else if (getLangOptions().CPlusPlus && // C++ [expr.unary.op]p6-7
resultType->isEnumeralType())
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 61d42f083c6..317e8cd6d38 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -845,7 +845,7 @@ static bool IsVectorConversion(ASTContext &Context, QualType FromType,
return false;
// Vector splat from any arithmetic type to a vector.
- if (!FromType->isVectorType() && FromType->isArithmeticType()) {
+ if (FromType->isArithmeticType()) {
ICK = ICK_Vector_Splat;
return true;
}
@@ -1041,8 +1041,7 @@ Sema::IsStandardConversion(Expr* From, QualType ToType,
FromType->isAnyPointerType() ||
FromType->isBlockPointerType() ||
FromType->isMemberPointerType() ||
- FromType->isNullPtrType()) &&
- /*FIXME*/!FromType->isVectorType()) {
+ FromType->isNullPtrType())) {
// Boolean conversions (C++ 4.12).
SCS.Second = ICK_Boolean_Conversion;
FromType = Context.BoolTy;
OpenPOWER on IntegriCloud