Index: include/clang/AST/ASTContext.h =================================================================== --- include/clang/AST/ASTContext.h +++ include/clang/AST/ASTContext.h @@ -70,6 +70,7 @@ class VTableContextBase; namespace Builtin { class Context; } + enum BuiltinTemplateNameKind : int; namespace comments { class FullComment; @@ -399,6 +400,7 @@ TranslationUnitDecl *TUDecl; mutable ExternCContextDecl *ExternCContext; + mutable BuiltinTemplateDecl *MakeIntegerSeqDecl; /// \brief The associated SourceManager object.a SourceManager &SourceMgr; @@ -821,6 +823,7 @@ TranslationUnitDecl *getTranslationUnitDecl() const { return TUDecl; } ExternCContextDecl *getExternCContextDecl() const; + BuiltinTemplateDecl *getMakeIntegerSeqDecl() const; // Builtin Types. CanQualType VoidTy; @@ -894,6 +897,9 @@ void PrintStats() const; const SmallVectorImpl& getTypes() const { return Types; } + BuiltinTemplateDecl * + buildBuiltinTemplateDecl(BuiltinTemplateNameKind BTNK) const; + /// \brief Create a new implicit TU-level CXXRecordDecl or RecordDecl /// declaration. RecordDecl *buildImplicitRecord(StringRef Name, @@ -1650,6 +1656,8 @@ DeclarationNameInfo getNameForTemplate(TemplateName Name, SourceLocation NameLoc) const; + TemplateName getBuiltinTemplateName(BuiltinTemplateNameKind BTNK) const; + TemplateName getOverloadedTemplateName(UnresolvedSetIterator Begin, UnresolvedSetIterator End) const; Index: include/clang/AST/DataRecursiveASTVisitor.h =================================================================== --- include/clang/AST/DataRecursiveASTVisitor.h +++ include/clang/AST/DataRecursiveASTVisitor.h @@ -1551,6 +1551,10 @@ TRY_TO(TraverseFunctionInstantiations(D)); }) +DEF_TRAVERSE_DECL(BuiltinTemplateDecl, { + TRY_TO(TraverseTemplateParameterListHelper(D->getTemplateParameters())); +}) + DEF_TRAVERSE_DECL(TemplateTemplateParmDecl, { // D is the "T" in something like // template