[cfe-commits] r86441 - /cfe/trunk/lib/Sema/SemaDeclCXX.cpp

Douglas Gregor dgregor at apple.com
Sat Nov 7 23:12:55 PST 2009


Author: dgregor
Date: Sun Nov  8 01:12:55 2009
New Revision: 86441

URL: http://llvm.org/viewvc/llvm-project?rev=86441&view=rev
Log:
Always make sure we're using an unqualified type when building a
constructor name.  Fixes PR5418.

Modified:
    cfe/trunk/lib/Sema/SemaDeclCXX.cpp

Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=86441&r1=86440&r2=86441&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Sun Nov  8 01:12:55 2009
@@ -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) {





More information about the cfe-commits mailing list