diff options
author | Anders Carlsson <andersca@mac.com> | 2009-03-28 04:17:27 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-03-28 04:17:27 +0000 |
commit | 72f307a26e85109dacc68887807734a1b72ad6a7 (patch) | |
tree | f2f1def8ef0ff3306c86eddd940b22bbd128b5c3 /clang/lib/Sema/SemaOverload.cpp | |
parent | 66918ee148dbff073d77173b3dd1d7d4cf2923b5 (diff) | |
download | bcm5719-llvm-72f307a26e85109dacc68887807734a1b72ad6a7.tar.gz bcm5719-llvm-72f307a26e85109dacc68887807734a1b72ad6a7.zip |
Revert Sebastian's rvalue patch (r67870) since it caused test failures in
SemaCXX//overload-member-call.cpp
SemaCXX//overloaded-operator.cpp
SemaTemplate//instantiate-method.cpp
llvm-svn: 67912
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index 08c3ce9e5a9..025a245c6ca 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -1584,17 +1584,18 @@ Sema::CompareStandardConversionSequences(const StandardConversionSequence& SCS1, return QualCK; if (SCS1.ReferenceBinding && SCS2.ReferenceBinding) { + QualType T1 = QualType::getFromOpaquePtr(SCS1.ToTypePtr); + QualType T2 = QualType::getFromOpaquePtr(SCS2.ToTypePtr); // C++0x [over.ics.rank]p3b4: // -- S1 and S2 are reference bindings (8.5.3) and neither refers to an // implicit object parameter of a non-static member function declared // without a ref-qualifier, and S1 binds an rvalue reference to an // rvalue and S2 binds an lvalue reference. - // FIXME: We don't know if we're dealing with the implicit object parameter, - // or if the member function in this case has a ref qualifier. - // (Of course, we don't have ref qualifiers yet.) - if (SCS1.RRefBinding != SCS2.RRefBinding) - return SCS1.RRefBinding ? ImplicitConversionSequence::Better - : ImplicitConversionSequence::Worse; + // FIXME: We have far too little information for this check. We don't know + // if the bound object is an rvalue. We don't know if the binding type is + // an rvalue or lvalue reference. We don't know if we're dealing with the + // implicit object parameter, or if the member function in this case has + // a ref qualifier. // C++ [over.ics.rank]p3b4: // -- S1 and S2 are reference bindings (8.5.3), and the types to @@ -1602,8 +1603,6 @@ Sema::CompareStandardConversionSequences(const StandardConversionSequence& SCS1, // top-level cv-qualifiers, and the type to which the reference // initialized by S2 refers is more cv-qualified than the type // to which the reference initialized by S1 refers. - QualType T1 = QualType::getFromOpaquePtr(SCS1.ToTypePtr); - QualType T2 = QualType::getFromOpaquePtr(SCS2.ToTypePtr); T1 = Context.getCanonicalType(T1); T2 = Context.getCanonicalType(T2); if (T1.getUnqualifiedType() == T2.getUnqualifiedType()) { |