diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-11-11 01:00:40 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-11-11 01:00:40 +0000 |
commit | 788cd06cf8e868a67158aafec5de3a1f408d14f3 (patch) | |
tree | 840b782d099e23e673436d5984883230afe3849c /test/SemaTemplate/temp_arg_nontype.cpp | |
parent | 5ee0aa715db363a7cdab112627fdd373f477b4df (diff) | |
download | clang-788cd06cf8e868a67158aafec5de3a1f408d14f3.tar.gz clang-788cd06cf8e868a67158aafec5de3a1f408d14f3.tar.bz2 clang-788cd06cf8e868a67158aafec5de3a1f408d14f3.tar.xz |
Introduce a new representation for template template
parameters. Rather than storing them as either declarations (for the
non-dependent case) or expressions (for the dependent case), we now
(always) store them as TemplateNames.
The primary change here is to add a new kind of TemplateArgument,
which stores a TemplateName. However, making that change ripples to
every switch on a TemplateArgument's kind, also affecting
TemplateArgumentLocInfo/TemplateArgumentLoc, default template
arguments for template template parameters, type-checking of template
template arguments, etc.
This change is light on testing. It should fix several pre-existing
problems with template template parameters, such as:
- the inability to use dependent template names as template template
arguments
- template template parameter default arguments cannot be
instantiation
However, there are enough pieces missing that more implementation is
required before we can adequately test template template parameters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86777 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/temp_arg_nontype.cpp')
-rw-r--r-- | test/SemaTemplate/temp_arg_nontype.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/SemaTemplate/temp_arg_nontype.cpp b/test/SemaTemplate/temp_arg_nontype.cpp index a6611582f1..bde92be93d 100644 --- a/test/SemaTemplate/temp_arg_nontype.cpp +++ b/test/SemaTemplate/temp_arg_nontype.cpp @@ -10,8 +10,7 @@ A<int> *a2; // expected-error{{template argument for non-type template parameter A<1 >> 2> *a3; // expected-warning{{use of right-shift operator ('>>') in template argument will require parentheses in C++0x}} // C++ [temp.arg.nontype]p5: -A<A> *a4; // expected-error{{must have an integral or enumeration type}} \ - // FIXME: the error message above is a bit lame +A<A> *a4; // expected-error{{must be an expression}} enum E { Enumerator = 17 }; A<E> *a5; // expected-error{{template argument for non-type template parameter must be an expression}} |