Make sure we're comparing the canonical types when we determine
whether a constructor is a copy constructor.

Sadly, I wasn't able to get down to a test case smaller than libstdc++'s
<string>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81913 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp
index 591f856..8755067 100644
--- a/lib/AST/DeclCXX.cpp
+++ b/lib/AST/DeclCXX.cpp
@@ -592,9 +592,10 @@
     return false;
 
   // Is it a reference to our class type?
-  QualType PointeeType
+  CanQualType PointeeType
     = Context.getCanonicalType(ParamRefType->getPointeeType());
-  QualType ClassTy = Context.getTagDeclType(getParent());
+  CanQualType ClassTy 
+    = Context.getCanonicalType(Context.getTagDeclType(getParent()));
   if (PointeeType.getUnqualifiedType() != ClassTy)
     return false;