diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-12-24 02:52:09 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-12-24 02:52:09 +0000 |
commit | c4b4e7b8f6ca9b036824e048af49cd2a52b57cdf (patch) | |
tree | 9f49436d6c7742234922d2fe5d16f29ade8c0edb /lib/Parse/ParseDeclCXX.cpp | |
parent | 07603aa9e57dc13889dd330cd29159003f1c45c3 (diff) |
Keep track of template arguments when we parse them. Right now, we don't actually do anything with the template arguments, but they'll be used to create template declarations
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61413 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDeclCXX.cpp')
-rw-r--r-- | lib/Parse/ParseDeclCXX.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index eaada1c26c..1b0b811c88 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/lib/Parse/ParseDeclCXX.cpp @@ -202,7 +202,8 @@ Parser::TypeTy *Parser::ParseClassName(const CXXScopeSpec *SS) { /// struct-or-union: /// 'struct' /// 'union' -void Parser::ParseClassSpecifier(DeclSpec &DS) { +void Parser::ParseClassSpecifier(DeclSpec &DS, + TemplateParameterLists *TemplateParams) { assert((Tok.is(tok::kw_class) || Tok.is(tok::kw_struct) || Tok.is(tok::kw_union)) && @@ -258,8 +259,13 @@ void Parser::ParseClassSpecifier(DeclSpec &DS) { } // Parse the tag portion of this. - DeclTy *TagDecl = Actions.ActOnTag(CurScope, TagType, TK, StartLoc, SS, Name, - NameLoc, Attr); + DeclTy *TagDecl + = Actions.ActOnTag(CurScope, TagType, TK, StartLoc, SS, Name, + NameLoc, Attr, + Action::MultiTemplateParamsArg( + Actions, + TemplateParams? &(*TemplateParams)[0] : 0, + TemplateParams? TemplateParams->size() : 0)); // Parse the optional base clause (C++ only). if (getLang().CPlusPlus && Tok.is(tok::colon)) { |