diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-02-09 23:23:08 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-02-09 23:23:08 +0000 |
commit | c15cb38a4ff717097b32532fbf761c71b1376a02 (patch) | |
tree | 7c232b8e658549facb629b726eb39951f20f1759 /test/SemaTemplate/temp_arg.cpp | |
parent | 672c91db00d28187600dd18ef6c524ff45e95ef2 (diff) | |
download | clang-c15cb38a4ff717097b32532fbf761c71b1376a02.tar.gz |
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
Diffstat (limited to 'test/SemaTemplate/temp_arg.cpp')
-rw-r--r-- | test/SemaTemplate/temp_arg.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaTemplate/temp_arg.cpp b/test/SemaTemplate/temp_arg.cpp new file mode 100644 index 0000000000..d62f681f39 --- /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'}} |