Implement parsing for explicit instantiations of class templates, e.g.,

  template class X<int>;

This also cleans up the propagation of template information through
declaration parsing, which is used to improve some diagnostics.

llvm-svn: 71608
diff --git a/clang/test/SemaTemplate/temp_explicit.cpp b/clang/test/SemaTemplate/temp_explicit.cpp
new file mode 100644
index 0000000..884fc38
--- /dev/null
+++ b/clang/test/SemaTemplate/temp_explicit.cpp
@@ -0,0 +1,19 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+//
+// Tests explicit instantiation of templates.
+template<typename T, typename U = T> class X0 { };
+
+namespace N {
+  template<typename T, typename U = T> class X1 { };
+}
+
+template class X0<int, float>;
+template class X0<int>;
+
+template class N::X1<int>;
+template class ::N::X1<int, float>;
+
+using namespace N;
+template class X1<float>;
+
+template class X0<double> { }; // expected-error{{explicit specialization}}