diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-26 14:30:28 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-26 14:30:28 +0000 |
commit | 480b53cfff18c40d10fcb09b0185a9b75dfd491e (patch) | |
tree | 88d1b4d0387c079893c591b84eeb984a5aac629c /test/SemaTemplate | |
parent | e6d1dff47d17154e99a98c499ee399df70a4bcf1 (diff) | |
download | clang-480b53cfff18c40d10fcb09b0185a9b75dfd491e.tar.gz |
Diagnose attempts to use 'using typename' with a non-identifier name,
from Stepan Dyatkovskiy. Fixes PR10925.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140528 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate')
-rw-r--r-- | test/SemaTemplate/typename-specifier.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaTemplate/typename-specifier.cpp b/test/SemaTemplate/typename-specifier.cpp index 7898a20d6e..9eb4f33de0 100644 --- a/test/SemaTemplate/typename-specifier.cpp +++ b/test/SemaTemplate/typename-specifier.cpp @@ -102,3 +102,16 @@ struct H { }; G<H> struct_G; + +namespace PR10925 { + template< int mydim, typename Traits > + class BasicGeometry + { + typedef int some_type_t; + }; + + template<class ctype, int mydim, int coorddim> + class MockGeometry : BasicGeometry<mydim, int>{ + using typename BasicGeometry<mydim, int>::operator[]; // expected-error {{typename is allowed for identifiers only}} + }; +} |