aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDeclCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-04 19:02:06 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-04 19:02:06 +0000
commitaaba5e346dffdbad5d1c42765a89e4a7afb0da67 (patch)
tree0bbf6ad0ff4609acaca0df33e72e02ba03d85235 /lib/Parse/ParseDeclCXX.cpp
parent0e8aaaf67b0c172e5a55cded30b80a83d3bd477f (diff)
Basic representation of C++ class templates, from Andrew Sutton.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDeclCXX.cpp')
-rw-r--r--lib/Parse/ParseDeclCXX.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index 1fbe32a459..b2b0d8f59f 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/lib/Parse/ParseDeclCXX.cpp
@@ -345,8 +345,8 @@ void Parser::ParseClassSpecifier(DeclSpec &DS,
return;
}
- // Parse the tag portion of this.
- DeclTy *TagDecl
+ // Create the tag portion of the class, possibly resulting in a template.
+ DeclTy *TagOrTempDecl
= Actions.ActOnTag(CurScope, TagType, TK, StartLoc, SS, Name,
NameLoc, Attr,
Action::MultiTemplateParamsArg(
@@ -356,15 +356,15 @@ void Parser::ParseClassSpecifier(DeclSpec &DS,
// Parse the optional base clause (C++ only).
if (getLang().CPlusPlus && Tok.is(tok::colon)) {
- ParseBaseClause(TagDecl);
+ ParseBaseClause(TagOrTempDecl);
}
// If there is a body, parse it and inform the actions module.
if (Tok.is(tok::l_brace))
if (getLang().CPlusPlus)
- ParseCXXMemberSpecification(StartLoc, TagType, TagDecl);
+ ParseCXXMemberSpecification(StartLoc, TagType, TagOrTempDecl);
else
- ParseStructUnionBody(StartLoc, TagType, TagDecl);
+ ParseStructUnionBody(StartLoc, TagType, TagOrTempDecl);
else if (TK == Action::TK_Definition) {
// FIXME: Complain that we have a base-specifier list but no
// definition.
@@ -372,7 +372,7 @@ void Parser::ParseClassSpecifier(DeclSpec &DS,
}
const char *PrevSpec = 0;
- if (DS.SetTypeSpecType(TagType, StartLoc, PrevSpec, TagDecl))
+ if (DS.SetTypeSpecType(TagType, StartLoc, PrevSpec, TagOrTempDecl))
Diag(StartLoc, diag::err_invalid_decl_spec_combination) << PrevSpec;
}