return getCanonicalType(T1) == getCanonicalType(T2);
}
+ bool hasSameType(const Type *T1, const Type *T2) const {
+ return getCanonicalType(T1) == getCanonicalType(T2);
+ }
+
/// \brief Return this type as a completely-unqualified array type,
/// capturing the qualifiers in \p Quals.
///
if (FromType->isMemberPointerType() && ToType->isMemberPointerType()) {
const MemberPointerType *FromMember = FromType->getAs<MemberPointerType>(),
*ToMember = ToType->getAs<MemberPointerType>();
- if (FromMember->getClass()->getCanonicalTypeInternal() !=
- ToMember->getClass()->getCanonicalTypeInternal()) {
+ if (!Context.hasSameType(FromMember->getClass(), ToMember->getClass())) {
PDiag << ft_different_class << QualType(ToMember->getClass(), 0)
<< QualType(FromMember->getClass(), 0);
return;