Make sure we don't name a constructor or destructor with a qualified
type. It leads to very weird errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62124 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index 26ef1bd..7ef7d85 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -1115,7 +1115,7 @@
CXXRecordDecl *ToRecordDecl = ToRecordType->getDecl();
DeclarationName ConstructorName
= Context.DeclarationNames.getCXXConstructorName(
- Context.getCanonicalType(ToType));
+ Context.getCanonicalType(ToType).getUnqualifiedType());
DeclContext::lookup_iterator Con, ConEnd;
for (llvm::tie(Con, ConEnd) = ToRecordDecl->lookup(ConstructorName);
Con != ConEnd; ++Con) {