diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-03-31 00:43:58 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-03-31 00:43:58 +0000 |
commit | c45c232440dfafedca1a3773b904fb42609b1b19 (patch) | |
tree | 8fc8ee76514079ac19b30b1200dddedd6f74dece /test/SemaTemplate/nested-name-spec-template.cpp | |
parent | af3e72285238369c2ea4ebd40a1c9a87bd3eabb7 (diff) |
Parsing and AST representation for dependent template names that occur
within nested-name-specifiers, e.g., for the "apply" in
typename MetaFun::template apply<T1, T2>::type
At present, we can't instantiate these nested-name-specifiers, so our
testing is sketchy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/nested-name-spec-template.cpp')
-rw-r--r-- | test/SemaTemplate/nested-name-spec-template.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaTemplate/nested-name-spec-template.cpp b/test/SemaTemplate/nested-name-spec-template.cpp index f856268d6e..6df2ca6a91 100644 --- a/test/SemaTemplate/nested-name-spec-template.cpp +++ b/test/SemaTemplate/nested-name-spec-template.cpp @@ -42,8 +42,21 @@ namespace N { struct A<int> { struct X; }; + + struct B; } struct ::N::A<int>::X { int foo; }; + +#if 0 +// FIXME: the following crashes the parser, because Sema has no way to +// community that the "dependent" template-name N::template B doesn't +// actually refer to a template. +template<typename T> +struct TestA { + typedef typename N::template B<T>::type type; // xpected-error{{'B' following the 'template' keyword does not refer to a template}} + // FIXME: should show what B *does* refer to. +}; +#endif |