summaryrefslogtreecommitdiff
path: root/test/SemaTemplate
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-09-26 14:30:28 +0000
committerDouglas Gregor <dgregor@apple.com>2011-09-26 14:30:28 +0000
commit480b53cfff18c40d10fcb09b0185a9b75dfd491e (patch)
tree88d1b4d0387c079893c591b84eeb984a5aac629c /test/SemaTemplate
parente6d1dff47d17154e99a98c499ee399df70a4bcf1 (diff)
downloadclang-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.cpp13
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}}
+ };
+}