diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-11 02:15:33 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-11 02:15:33 +0000 |
commit | 604eb65686590f73551d4ea608b174d2244cdd0f (patch) | |
tree | 9bff98f1b559d0ed8672c390ae73e3368fe6166b /lib/Sema/SemaCodeComplete.cpp | |
parent | 7fc3702694996d7d373e3280812a4172cf451aac (diff) |
Improve our handling of user-defined conversions when computing
implicit conversion sequences. In particular, model the "standard
conversion" from a class to its own type (or a base type) directly as
a standard conversion in the normal path *without* trying to determine
if there is a valid copy constructor. This appears to match the intent
of C++ [over.best.ics]p6 and more closely matches GCC and EDG.
As part of this, model non-lvalue reference initialization via
user-defined conversion in overloading the same way we handle it in
InitializationSequence, separating the "general user-defined
conversion" and "conversion to compatible class type" cases.
The churn in the overload-call-copycon.cpp test case is because the
test case was originally wrong; it assumed that we should do more
checking for copy constructors that we actually should, which affected
overload resolution.
Fixes PR7055. Bootstrapped okay.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110773 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
0 files changed, 0 insertions, 0 deletions