summaryrefslogtreecommitdiffstats
path: root/clang
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
commit060d5e248e6b4f0d805fc836465dab6d06403120 (patch)
treed2d7e84a72cec13fdea896ca1a6010ce6a033559 /clang
parent52d4d8244b7c39c5cdbcb0a918872806f7c9b6e0 (diff)
downloadbcm5719-llvm-060d5e248e6b4f0d805fc836465dab6d06403120.tar.gz
bcm5719-llvm-060d5e248e6b4f0d805fc836465dab6d06403120.zip
Use CheckVectorOperands when % is applied to a vector type.
llvm-svn: 61763
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index d65c10bb50c..42ef417de47 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud