diff options
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 13 |
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) |

