Moved diagnosis of forward declarations of variable templates from Parser to Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187768 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 80fab62..3f15b5b 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -1801,21 +1801,11 @@
     ThisDecl = Actions.ActOnTemplateDeclarator(getCurScope(),
                                                *TemplateInfo.TemplateParams,
                                                D);
-
-    // If this is a forward declaration of a variable template or variable
-    // template partial specialization with nested name specifier, complain.
-    // FIXME: Move to Sema.
-    CXXScopeSpec &SS = D.getCXXScopeSpec();
-    if (Tok.is(tok::semi) && ThisDecl && SS.isNotEmpty() &&
-        (isa<VarTemplateDecl>(ThisDecl) ||
-         isa<VarTemplatePartialSpecializationDecl>(ThisDecl))) {
-      Diag(SS.getBeginLoc(), diag::err_forward_var_nested_name_specifier)
-          << isa<VarTemplatePartialSpecializationDecl>(ThisDecl)
-          << SS.getRange();
+    if (Tok.is(tok::semi) &&
+	Actions.HandleVariableRedeclaration(ThisDecl, D.getCXXScopeSpec())) {
       SkipUntil(tok::semi, true, true);
       return 0;
     }
-
     if (VarTemplateDecl *VT =
             ThisDecl ? dyn_cast<VarTemplateDecl>(ThisDecl) : 0)
       // Re-direct this decl to refer to the templated decl so that we can