summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-06 23:55:33 +0000
committerChris Lattner <sabre@nondot.org>2008-04-06 23:55:33 +0000
commitd4bacd68bf7e8d30bfa0dc483f70600eaf58f40d (patch)
tree9754e84091aad8826e989f610ff474cd35eb621f /clang/lib/Sema
parentb90739d556d6126d04ad563726d9d4ea68a4c0c1 (diff)
downloadbcm5719-llvm-d4bacd68bf7e8d30bfa0dc483f70600eaf58f40d.tar.gz
bcm5719-llvm-d4bacd68bf7e8d30bfa0dc483f70600eaf58f40d.zip
simplify max type computation by making it return an integer (like
getFloatingTypeOrder) instead of a type. Fix a fixme. llvm-svn: 49297
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 73e075f7d6a..a661d0172bf 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -1068,8 +1068,8 @@ QualType Sema::UsualArithmeticConversions(Expr *&lhsExpr, Expr *&rhsExpr,
const ComplexType *rhsComplexInt = rhs->getAsComplexIntegerType();
if (lhsComplexInt && rhsComplexInt) {
- if (Context.getMaxIntegerType(lhsComplexInt->getElementType(),
- rhsComplexInt->getElementType()) == lhs) {
+ if (Context.getIntegerTypeOrder(lhsComplexInt->getElementType(),
+ rhsComplexInt->getElementType()) >= 0) {
// convert the rhs
if (!isCompAssign) ImpCastExprToType(rhsExpr, lhs);
return lhs;
@@ -1088,7 +1088,7 @@ QualType Sema::UsualArithmeticConversions(Expr *&lhsExpr, Expr *&rhsExpr,
}
}
// Finally, we have two differing integer types.
- if (Context.getMaxIntegerType(lhs, rhs) == lhs) { // convert the rhs
+ if (Context.getIntegerTypeOrder(lhs, rhs) >= 0) { // convert the rhs
if (!isCompAssign) ImpCastExprToType(rhsExpr, lhs);
return lhs;
}
OpenPOWER on IntegriCloud