diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-26 02:07:32 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-26 02:07:32 +0000 |
commit | 98bfbf5354b8b35fd3efd12932894d7452697226 (patch) | |
tree | c2226d748a4bee89c77286484464f208b805dd3b /lib | |
parent | 67234726d2c1e91760cad8b268a147869a55e12a (diff) |
Fix mismatch between pointer and pointee type when diagnosing an incorrect
object argument type for a member call.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173554 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index e1c3d6839d..22cb61eda3 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -4620,7 +4620,7 @@ static bool TryCopyInitialization(const CanQualType FromQTy, /// parameter of the given member function (@c Method) from the /// expression @p From. static ImplicitConversionSequence -TryObjectArgumentInitialization(Sema &S, QualType OrigFromType, +TryObjectArgumentInitialization(Sema &S, QualType FromType, Expr::Classification FromClassification, CXXMethodDecl *Method, CXXRecordDecl *ActingContext) { @@ -4636,7 +4636,6 @@ TryObjectArgumentInitialization(Sema &S, QualType OrigFromType, ImplicitConversionSequence ICS; // We need to have an object of class type. - QualType FromType = OrigFromType; if (const PointerType *PT = FromType->getAs<PointerType>()) { FromType = PT->getPointeeType(); @@ -4671,7 +4670,7 @@ TryObjectArgumentInitialization(Sema &S, QualType OrigFromType, != FromTypeCanon.getLocalCVRQualifiers() && !ImplicitParamType.isAtLeastAsQualifiedAs(FromTypeCanon)) { ICS.setBad(BadConversionSequence::bad_qualifiers, - OrigFromType, ImplicitParamType); + FromType, ImplicitParamType); return ICS; } |