Always make sure we're using an unqualified type when building a
constructor name.  Fixes PR5418.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86441 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index c7fd5cc..f7c4428 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -1166,7 +1166,7 @@
   CXXConstructorDecl *C = 0;
   if (!BaseType->isDependentType() && !HasDependentArg) {
     DeclarationName Name = Context.DeclarationNames.getCXXConstructorName(
-                                            Context.getCanonicalType(BaseType));
+                      Context.getCanonicalType(BaseType).getUnqualifiedType());
     ASTOwningVector<&ActionBase::DeleteExpr> ConstructorArgs(*this);
 
     C = PerformInitializationByConstructor(BaseType, 
@@ -3450,7 +3450,7 @@
   // Add constructors to the overload set.
   DeclarationName ConstructorName
     = Context.DeclarationNames.getCXXConstructorName(
-                       Context.getCanonicalType(ClassType.getUnqualifiedType()));
+                      Context.getCanonicalType(ClassType).getUnqualifiedType());
   DeclContext::lookup_const_iterator Con, ConEnd;
   for (llvm::tie(Con, ConEnd) = ClassDecl->lookup(ConstructorName);
        Con != ConEnd; ++Con) {