Use the canonical type when comparing array types so the comparison 
doesn't get confused by typedefs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46502 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp
index 7c089ee..9dd3069 100644
--- a/Sema/SemaDecl.cpp
+++ b/Sema/SemaDecl.cpp
@@ -296,8 +296,8 @@
   if (hasUndefinedLength(NewAT) || hasUndefinedLength(OldAT)) {
     if (NewAT->getIndexTypeQualifier() != OldAT->getIndexTypeQualifier())
       return false;
-    NewQType = NewAT->getElementType();
-    OldQType = OldAT->getElementType();
+    NewQType = NewAT->getElementType().getCanonicalType();
+    OldQType = OldAT->getElementType().getCanonicalType();
   }
   
   return NewQType == OldQType;