Improve the semantic checking for explicit instantiations of
templates. In particular:
  - An explicit instantiation can follow an implicit instantiation (we
  were improperly diagnosing this as an error, previously).
  - In C++0x, an explicit instantiation that follows an explicit
  specialization of the same template specialization is ignored. In
  C++98, we just emit an extension warning.
  - In C++0x, an explicit instantiation must be in a namespace
  enclosing the original template. C++98 has no such requirement.

Also, fixed a longstanding FIXME regarding the integral type that is
used for the size of a constant array type when it is being instantiated.

llvm-svn: 71689
diff --git a/clang/test/SemaTemplate/temp_explicit.cpp b/clang/test/SemaTemplate/temp_explicit.cpp
index 527532c..b6009bd 100644
--- a/clang/test/SemaTemplate/temp_explicit.cpp
+++ b/clang/test/SemaTemplate/temp_explicit.cpp
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic %s
 //
 // Tests explicit instantiation of templates.
 template<typename T, typename U = T> class X0 { };
@@ -24,13 +24,13 @@
 
 // Check for explicit instantiations that come after other kinds of
 // instantiations or declarations.
-template class X0<int, int>; // expected-error{{after}}
+template class X0<int, int>; // expected-error{{duplicate}}
 
 template<> class X0<char> { }; // expected-note{{previous}}
-template class X0<char>; // expected-error{{after}}
+template class X0<char>; // expected-warning{{ignored}}
 
-void foo(X0<short>) { } // expected-note{{previous}}
-template class X0<short>;  // expected-error{{after}}
+void foo(X0<short>) { }
+template class X0<short>;
 
 // Check that explicit instantiations actually produce definitions. We
 // determine whether this happens by placing semantic errors in the