summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-11-13 20:12:29 +0000
committerDouglas Gregor <dgregor@apple.com>2008-11-13 20:12:29 +0000
commit58e008d2a61a73aaa2af07958b15c6f451b92eac (patch)
treeff0b4a4394e483dbf20d7465359c48f83053d8d4 /clang/lib/Sema/SemaExpr.cpp
parentf8cfd1647ec0be5fe9310c838eabdc1af8313d64 (diff)
downloadbcm5719-llvm-58e008d2a61a73aaa2af07958b15c6f451b92eac.tar.gz
bcm5719-llvm-58e008d2a61a73aaa2af07958b15c6f451b92eac.zip
Some cleanup for the implementation of built-in operator
candidates. Thanks to Chris for the review! llvm-svn: 59260
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 21bf990fba1..c9f311a204a 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -130,15 +130,10 @@ QualType Sema::UsualArithmeticConversionsType(QualType lhs, QualType rhs) {
// lhs == rhs check. Also, for conversion purposes, we ignore any
// qualifiers. For example, "const float" and "float" are
// equivalent.
- if (lhs->isPromotableIntegerType())
- lhs = Context.IntTy;
- else
- lhs = Context.getCanonicalType(lhs).getUnqualifiedType();
-
- if (rhs->isPromotableIntegerType())
- rhs = Context.IntTy;
- else
- rhs = Context.getCanonicalType(rhs).getUnqualifiedType();
+ if (lhs->isPromotableIntegerType()) lhs = Context.IntTy;
+ else lhs = lhs.getUnqualifiedType();
+ if (rhs->isPromotableIntegerType()) rhs = Context.IntTy;
+ else rhs = rhs.getUnqualifiedType();
// If both types are identical, no conversion is needed.
if (lhs == rhs)
OpenPOWER on IntegriCloud