summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2014-05-20 04:10:24 +0000
committerRichard Trieu <rtrieu@google.com>2014-05-20 04:10:24 +0000
commit5fe0a42ae91f720fefe487541bb6af67027be5d1 (patch)
treea8f994847894a7865ffeffc0a69430b93bab2d2b /clang/lib/Sema/SemaOverload.cpp
parent8e1d489351b9cb2c91f81429f12aea4160c12e2a (diff)
downloadbcm5719-llvm-5fe0a42ae91f720fefe487541bb6af67027be5d1.tar.gz
bcm5719-llvm-5fe0a42ae91f720fefe487541bb6af67027be5d1.zip
Fix diagnostic message for member function pointer mismatches where one of the
classes is a template argument. llvm-svn: 209190
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r--clang/lib/Sema/SemaOverload.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index af7aeae3032..3ea939f4cdc 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -2526,7 +2526,8 @@ void Sema::HandleFunctionTypeMismatch(PartialDiagnostic &PDiag,
if (FromType->isMemberPointerType() && ToType->isMemberPointerType()) {
const MemberPointerType *FromMember = FromType->getAs<MemberPointerType>(),
*ToMember = ToType->getAs<MemberPointerType>();
- if (FromMember->getClass() != ToMember->getClass()) {
+ if (FromMember->getClass()->getCanonicalTypeInternal() !=
+ ToMember->getClass()->getCanonicalTypeInternal()) {
PDiag << ft_different_class << QualType(ToMember->getClass(), 0)
<< QualType(FromMember->getClass(), 0);
return;
OpenPOWER on IntegriCloud