Parse extern templates, pass that information all the way to Sema,
then drop it on the floor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80989 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseTemplate.cpp b/lib/Parse/ParseTemplate.cpp
index 34cabfd..40de81a 100644
--- a/lib/Parse/ParseTemplate.cpp
+++ b/lib/Parse/ParseTemplate.cpp
@@ -25,7 +25,8 @@
                                              SourceLocation &DeclEnd,
                                              AccessSpecifier AS) {
   if (Tok.is(tok::kw_template) && NextToken().isNot(tok::less))
-    return ParseExplicitInstantiation(ConsumeToken(), DeclEnd);
+    return ParseExplicitInstantiation(SourceLocation(), ConsumeToken(), 
+                                      DeclEnd);
 
   return ParseTemplateDeclarationOrSpecialization(Context, DeclEnd, AS);
 }
@@ -186,7 +187,6 @@
   
   // Parse the declaration specifiers.
   DeclSpec DS;
-  // FIXME: Pass TemplateLoc through for explicit template instantiations
   ParseDeclarationSpecifiers(DS, TemplateInfo, AS);
 
   if (Tok.is(tok::semi)) {
@@ -871,11 +871,15 @@
 /// (C++ [temp.explicit]).
 ///
 ///       explicit-instantiation:
-///         'template' declaration
+///         'extern' [opt] 'template' declaration
+///
+/// Note that the 'extern' is a GNU extension and C++0x feature.
 Parser::DeclPtrTy 
-Parser::ParseExplicitInstantiation(SourceLocation TemplateLoc,
+Parser::ParseExplicitInstantiation(SourceLocation ExternLoc,
+                                   SourceLocation TemplateLoc,
                                    SourceLocation &DeclEnd) {
   return ParseSingleDeclarationAfterTemplate(Declarator::FileContext, 
-                                             ParsedTemplateInfo(TemplateLoc),
+                                             ParsedTemplateInfo(ExternLoc,
+                                                                TemplateLoc),
                                              DeclEnd, AS_none);
 }