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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64185 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/temp_arg.cpp b/test/SemaTemplate/temp_arg.cpp
new file mode 100644
index 0000000..d62f681
--- /dev/null
+++ b/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'}}