summaryrefslogtreecommitdiffstats
path: root/clang/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
commitded2d7b0211a96f70392e829b399546453dff40e (patch)
tree9fdfcd217f54a65240b978e11fdfd832c1eeadca /clang/lib/Parse/ParseDeclCXX.cpp
parentcddff7fd625896d7ef1e8c430eb1ef819efe6b52 (diff)
downloadbcm5719-llvm-ded2d7b0211a96f70392e829b399546453dff40e.tar.gz
bcm5719-llvm-ded2d7b0211a96f70392e829b399546453dff40e.zip
Basic representation of C++ class templates, from Andrew Sutton.
llvm-svn: 63750
Diffstat (limited to 'clang/lib/Parse/ParseDeclCXX.cpp')
-rw-r--r--clang/lib/Parse/ParseDeclCXX.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp
index 1fbe32a4591..b2b0d8f59fa 100644
--- a/clang/lib/Parse/ParseDeclCXX.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud