diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-11-08 17:16:59 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-11-08 17:16:59 +0000 |
commit | 6493cc50b66c2d097b3e22514bbe303048c4a8ff (patch) | |
tree | 95cab209c6d292e458dc8122e498550f837233da /lib/Sema/SemaOverload.cpp | |
parent | 67e40d4a8627b951e98ad92fd927433f325a1c30 (diff) |
Improve our handling of C++ [class.copy]p3, which specifies that a
constructor template will not be used to copy a class object to a
value of its own type. We were eliminating all constructor templates
whose specializations look like a copy constructor, which eliminated
important candidates. Fixes PR8182.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118418 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 3ed79fd461..440f5acdbc 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -3457,7 +3457,7 @@ Sema::AddOverloadCandidate(FunctionDecl *Function, // of a class object to an object of its class type. QualType ClassType = Context.getTypeDeclType(Constructor->getParent()); if (NumArgs == 1 && - Constructor->isCopyConstructorLikeSpecialization() && + Constructor->isSpecializationCopyingObject() && (Context.hasSameUnqualifiedType(ClassType, Args[0]->getType()) || IsDerivedFrom(Args[0]->getType(), ClassType))) return; |