diff options
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiate.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp index 562749e18f..c1f67c78ad 100644 --- a/lib/Sema/SemaTemplateInstantiate.cpp +++ b/lib/Sema/SemaTemplateInstantiate.cpp @@ -265,9 +265,16 @@ QualType TemplateTypeInstantiator:: InstantiateMemberPointerType(const MemberPointerType *T, unsigned Quals) const { - // FIXME: Implement this - assert(false && "Cannot instantiate MemberPointerType yet"); - return QualType(); + QualType PointeeType = Instantiate(T->getPointeeType()); + if (PointeeType.isNull()) + return QualType(); + + QualType ClassType = Instantiate(QualType(T->getClass(), 0)); + if (ClassType.isNull()) + return QualType(); + + return SemaRef.BuildMemberPointerType(PointeeType, ClassType, Quals, Loc, + Entity); } QualType |