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
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index 1fbe32a..b2b0d8f 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/lib/Parse/ParseDeclCXX.cpp
@@ -345,8 +345,8 @@
     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 @@
 
   // 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 @@
   }
 
   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;
 }