|
@@ -379,6 +379,19 @@ QualType getFullyQualifiedType(QualType QT, const ASTContext &Ctx,
|
|
|
return QT;
|
|
|
}
|
|
|
|
|
|
+ if (auto *MPT = dyn_cast<MemberPointerType>(QT.getTypePtr())) {
|
|
|
+ // Get the qualifiers.
|
|
|
+ Qualifiers Quals = QT.getQualifiers();
|
|
|
+ // Fully qualify the pointee and class types.
|
|
|
+ QT = getFullyQualifiedType(QT->getPointeeType(), Ctx, WithGlobalNsPrefix);
|
|
|
+ QualType Class = getFullyQualifiedType(QualType(MPT->getClass(), 0), Ctx,
|
|
|
+ WithGlobalNsPrefix);
|
|
|
+ QT = Ctx.getMemberPointerType(QT, Class.getTypePtr());
|
|
|
+ // Add back the qualifiers.
|
|
|
+ QT = Ctx.getQualifiedType(QT, Quals);
|
|
|
+ return QT;
|
|
|
+ }
|
|
|
+
|
|
|
// In case of myType& we need to strip the reference first, fully
|
|
|
// qualify and attach the reference once again.
|
|
|
if (isa<ReferenceType>(QT.getTypePtr())) {
|