diff --git a/interpreter/llvm/src/tools/clang/lib/AST/ASTImporter.cpp b/interpreter/llvm/src/tools/clang/lib/AST/ASTImporter.cpp index 2442e8ec25f12..b120d58fb2aa8 100644 --- a/interpreter/llvm/src/tools/clang/lib/AST/ASTImporter.cpp +++ b/interpreter/llvm/src/tools/clang/lib/AST/ASTImporter.cpp @@ -67,7 +67,7 @@ namespace clang { // FIXME: DependentDecltypeType QualType VisitRecordType(const RecordType *T); QualType VisitEnumType(const EnumType *T); - // FIXME: TemplateTypeParmType + QualType VisitTemplateTypeParmType(const TemplateTypeParmType *T); // FIXME: SubstTemplateTypeParmType QualType VisitTemplateSpecializationType(const TemplateSpecializationType *T); QualType VisitElaboratedType(const ElaboratedType *T); @@ -1724,6 +1724,18 @@ QualType ASTNodeImporter::VisitEnumType(const EnumType *T) { return Importer.getToContext().getTagDeclType(ToDecl); } +QualType ASTNodeImporter::VisitTemplateTypeParmType(const TemplateTypeParmType *T) { + TemplateTypeParmDecl *ToDecl + = dyn_cast_or_null(Importer.Import(T->getDecl())); + if (!ToDecl) + return QualType(); + + return Importer.getToContext().getTemplateTypeParmType(T->getDepth(), + T->getIndex(), + T->isParameterPack(), + ToDecl); +} + QualType ASTNodeImporter::VisitTemplateSpecializationType( const TemplateSpecializationType *T) { TemplateName ToTemplate = Importer.Import(T->getTemplateName());