diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-11-08 07:12:55 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-11-08 07:12:55 +0000 |
commit | 3eaa9ffa176e5d240a0b140b35cc104ee3d63936 (patch) | |
tree | 3401e9f2894b403cdbc69a45cf00095ace927501 /lib/Sema/SemaDeclCXX.cpp | |
parent | c6190330e7b84bc9d28041c671d7022fb847d68d (diff) |
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
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index c7fd5ccd1e..f7c4428611 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -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) { |