Rudimentary checking of template arguments against their corresponding
template parameters when performing semantic analysis of a template-id
naming a class template specialization.

llvm-svn: 64185
diff --git a/clang/test/SemaTemplate/temp_arg.cpp b/clang/test/SemaTemplate/temp_arg.cpp
new file mode 100644
index 0000000..d62f681
--- /dev/null
+++ b/clang/test/SemaTemplate/temp_arg.cpp
@@ -0,0 +1,13 @@
+// RUN: clang -fsyntax-only -verify %s
+template<typename T, 
+         int I, 
+         template<typename> class TT>
+  class A;
+
+template<typename> class X;
+
+A<int, 0, X> * a1;
+
+A<float, 1, X, double> *a2; // expected-error{{too many template arguments for class template 'A'}}
+
+A<float, 1> *a3; // expected-error{{too few template arguments for class template 'A'}}