]> granicus.if.org Git - clang/commitdiff
Always make sure we're using an unqualified type when building a
authorDouglas Gregor <dgregor@apple.com>
Sun, 8 Nov 2009 07:12:55 +0000 (07:12 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sun, 8 Nov 2009 07:12:55 +0000 (07:12 +0000)
constructor name.  Fixes PR5418.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86441 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclCXX.cpp

index c7fd5ccd1e6f67865a6f2bc8dd8db470054a8141..f7c4428611e6d9c77970e0ed9f2dcb07ed395442 100644 (file)
@@ -1166,7 +1166,7 @@ Sema::BuildBaseInitializer(QualType BaseType, Expr **Args,
   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 @@ Sema::PerformInitializationByConstructor(QualType ClassType,
   // 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) {