Some cleanup for the implementation of built-in operator
candidates. Thanks to Chris for the review!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59260 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 21bf990..c9f311a 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -130,15 +130,10 @@
// 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)