summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-01-26 02:07:32 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-01-26 02:07:32 +0000
commit03c66d3c57b51188f33e7342088a636ae772c37c (patch)
treeb3de3c32a76606940b8baa52bd960183a43ceb57 /clang/lib
parentd006f6eb5f1e38d6d3e110872303d4b644139d62 (diff)
downloadbcm5719-llvm-03c66d3c57b51188f33e7342088a636ae772c37c.tar.gz
bcm5719-llvm-03c66d3c57b51188f33e7342088a636ae772c37c.zip
Fix mismatch between pointer and pointee type when diagnosing an incorrect
object argument type for a member call. llvm-svn: 173554
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaOverload.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index e1c3d6839d1..22cb61eda39 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud