diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2011-02-26 22:09:03 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2011-02-26 22:09:03 +0000 | 
| commit | c3b054d250cdca485c71845089c316e10610ebad (patch) | |
| tree | abae0246ec9156cc1a7cbb947b2b0dfe95fa3189 /include/clang/AST/DeclTemplate.h | |
| parent | bca07a4524feb4edec581062d631a13116320a24 (diff) | |
Diffstat (limited to 'include/clang/AST/DeclTemplate.h')
| -rw-r--r-- | include/clang/AST/DeclTemplate.h | 17 | 
1 files changed, 17 insertions, 0 deletions
| diff --git a/include/clang/AST/DeclTemplate.h b/include/clang/AST/DeclTemplate.h index 176c6badae16..f41859c85790 100644 --- a/include/clang/AST/DeclTemplate.h +++ b/include/clang/AST/DeclTemplate.h @@ -48,6 +48,7 @@ class TemplateParameterList {    /// parameter list.    unsigned NumParams; +protected:    TemplateParameterList(SourceLocation TemplateLoc, SourceLocation LAngleLoc,                          NamedDecl **Params, unsigned NumParams,                          SourceLocation RAngleLoc); @@ -107,6 +108,19 @@ public:    }  }; +/// FixedSizeTemplateParameterList - Stores a list of template parameters for a +/// TemplateDecl and its derived classes. Suitable for creating on the stack. +template<size_t N> +class FixedSizeTemplateParameterList : public TemplateParameterList { +  NamedDecl *Params[N]; + +public: +  FixedSizeTemplateParameterList(SourceLocation TemplateLoc, SourceLocation LAngleLoc, +                                 NamedDecl **Params, SourceLocation RAngleLoc) : +    TemplateParameterList(TemplateLoc, LAngleLoc, Params, N, RAngleLoc) { +  } +}; +  /// \brief A template argument list.  class TemplateArgumentList {    /// \brief The template argument list. @@ -914,6 +928,9 @@ class TemplateTypeParmDecl : public TypeDecl {      TypeForDecl = Type.getTypePtrOrNull();    } +  /// Sema creates these on the stack during auto type deduction. +  friend class Sema; +  public:    static TemplateTypeParmDecl *Create(const ASTContext &C, DeclContext *DC,                                        SourceLocation L, unsigned D, unsigned P, | 
