aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-01-05 22:42:10 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-01-05 22:42:10 +0000
commit69d1d0029311fa657dd0be16b1b5ca51ec98d621 (patch)
tree4cbf0233c73eecb853c6beef20f65d63a5060932 /lib
parentd786f6a6b791b5901fa9fd39a2bbf924afbc1252 (diff)
Use CheckVectorOperands when % is applied to a vector type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61763 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaExpr.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index d65c10bb50..42ef417de4 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -2361,9 +2361,7 @@ inline QualType Sema::CheckVectorOperands(SourceLocation Loc, Expr *&lex,
inline QualType Sema::CheckMultiplyDivideOperands(
Expr *&lex, Expr *&rex, SourceLocation Loc, bool isCompAssign)
{
- QualType lhsType = lex->getType(), rhsType = rex->getType();
-
- if (lhsType->isVectorType() || rhsType->isVectorType())
+ if (lex->getType()->isVectorType() || rex->getType()->isVectorType())
return CheckVectorOperands(Loc, lex, rex);
QualType compType = UsualArithmeticConversions(lex, rex, isCompAssign);
@@ -2376,7 +2374,8 @@ inline QualType Sema::CheckMultiplyDivideOperands(
inline QualType Sema::CheckRemainderOperands(
Expr *&lex, Expr *&rex, SourceLocation Loc, bool isCompAssign)
{
- QualType lhsType = lex->getType(), rhsType = rex->getType();
+ if (lex->getType()->isVectorType() || rex->getType()->isVectorType())
+ return CheckVectorOperands(Loc, lex, rex);
QualType compType = UsualArithmeticConversions(lex, rex, isCompAssign);