change more instances of QualType::getCanonicalType to call
ASTContext::getCanonicalType instead (PR2189)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54105 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index e2986a8..bf9f7a0 100644
--- a/lib/Sema/Sema.cpp
+++ b/lib/Sema/Sema.cpp
@@ -110,7 +110,8 @@
 /// ImpCastExprToType - If Expr is not of type 'Type', insert an implicit cast. 
 /// If there is already an implicit cast, merge into the existing one.
 void Sema::ImpCastExprToType(Expr *&Expr, QualType Type) {
-  if (Expr->getType().getCanonicalType() == Type.getCanonicalType()) return;
+  if (Context.getCanonicalType(Expr->getType()) ==
+        Context.getCanonicalType(Type)) return;
   
   if (ImplicitCastExpr *ImpCast = dyn_cast<ImplicitCastExpr>(Expr))
     ImpCast->setType(Type);