diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-19 17:02:01 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-19 17:02:01 +0000 |
commit | 06ebc98ff017fadfaed515bc06f50ce94ca468d6 (patch) | |
tree | ea913db3f33c5ccda8859e96a57434ed08e5c6e0 /lib/Sema/SemaOverload.cpp | |
parent | b2842aa3a76b53033e1619c494e972cdbe190939 (diff) |
We don't actually need to check the implicit object argument's
conversion a second time for a conversion candidate (with the real
acting context), because the only problems we would find are access or
ambiguity issues that won't be diagnosed until we pick this
candidate. Add a test case to prove it to myself.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111526 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index f8f04defb1..30979b78d3 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -3767,21 +3767,6 @@ Sema::AddConversionCandidate(CXXConversionDecl *Conversion, return; } - // Make sure that the actual object argument initialization will work, when - // it comes down to it. This takes into account the actual acting context. - if (ConversionContext->getCanonicalDecl() - != ActingContext->getCanonicalDecl()) { - ImplicitConversionSequence ObjectConvertICS - = TryObjectArgumentInitialization(From->getType(), Conversion, - ActingContext); - if (ObjectConvertICS.isBad()) { - Candidate.Viable = false; - Candidate.FailureKind = ovl_fail_bad_conversion; - Candidate.Conversions[0] = ObjectConvertICS; - return; - } - } - // We won't go through a user-define type conversion function to convert a // derived to base as such conversions are given Conversion Rank. They only // go through a copy constructor. 13.3.3.1.2-p4 [over.ics.user] |