avoid making implicit casts that just remove typedefs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47074 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/Sema.cpp b/Sema/Sema.cpp
index ffa81a2..ff8e182 100644
--- a/Sema/Sema.cpp
+++ b/Sema/Sema.cpp
@@ -124,7 +124,7 @@
 /// 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() == Type) return;
+  if (Expr->getType().getCanonicalType() == Type.getCanonicalType()) return;
   
   if (ImplicitCastExpr *ImpCast = dyn_cast<ImplicitCastExpr>(Expr))
     ImpCast->setType(Type);