aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-12-24 02:52:09 +0000
committerDouglas Gregor <dgregor@apple.com>2008-12-24 02:52:09 +0000
commitc4b4e7b8f6ca9b036824e048af49cd2a52b57cdf (patch)
tree9f49436d6c7742234922d2fe5d16f29ade8c0edb /lib/Parse/Parser.cpp
parent07603aa9e57dc13889dd330cd29159003f1c45c3 (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/Parser.cpp')
-rw-r--r--lib/Parse/Parser.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index 48b0d5f422..e5b40d9a44 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -373,7 +373,9 @@ Parser::DeclTy *Parser::ParseExternalDeclaration() {
/// ParseDeclarationOrFunctionDefinition - Parse either a function-definition or
/// a declaration. We can't tell which we have until we read up to the
-/// compound-statement in function-definition.
+/// compound-statement in function-definition. TemplateParams, if
+/// non-NULL, provides the template parameters when we're parsing a
+/// C++ template-declaration.
///
/// function-definition: [C99 6.9.1]
/// decl-specs declarator declaration-list[opt] compound-statement
@@ -385,10 +387,12 @@ Parser::DeclTy *Parser::ParseExternalDeclaration() {
/// [!C99] init-declarator-list ';' [TODO: warn in c99 mode]
/// [OMP] threadprivate-directive [TODO]
///
-Parser::DeclTy *Parser::ParseDeclarationOrFunctionDefinition() {
+Parser::DeclTy *
+Parser::ParseDeclarationOrFunctionDefinition(
+ TemplateParameterLists *TemplateParams) {
// Parse the common declaration-specifiers piece.
DeclSpec DS;
- ParseDeclarationSpecifiers(DS);
+ ParseDeclarationSpecifiers(DS, TemplateParams);
// C99 6.7.2.3p6: Handle "struct-or-union identifier;", "enum { X };"
// declaration-specifiers init-declarator-list[opt] ';'