summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/nested-template.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-10 00:12:48 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-10 00:12:48 +0000
commit1cdcc579df30dba1b2e1e9909125bb9c61898e05 (patch)
tree673f473def8c90dedbe4a2304e778d8172715f23 /test/SemaTemplate/nested-template.cpp
parentf8d8d1a99b802b8e9f2e7da441b64096b89f133d (diff)
downloadclang-1cdcc579df30dba1b2e1e9909125bb9c61898e05.tar.gz
When re-entering a template scope, we may be entering a class template
partial specialization rather than a subclass of TemplateDecl. Fixes a crash in libstdc++ 4.2's <map>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81407 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/nested-template.cpp')
-rw-r--r--test/SemaTemplate/nested-template.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaTemplate/nested-template.cpp b/test/SemaTemplate/nested-template.cpp
index 896eb72398..5ee2c99540 100644
--- a/test/SemaTemplate/nested-template.cpp
+++ b/test/SemaTemplate/nested-template.cpp
@@ -91,3 +91,13 @@ Y Outer<X>::Inner1<Y>::ReallyInner::value3 = Y();
template<typename X>
template<typename Y>
Y Outer<X>::Inner1<Y*>::ReallyInner::value4; // expected-error{{Outer<X>::Inner1<Y *>::ReallyInner::}}
+
+
+template<typename T>
+struct X0 { };
+
+template<typename T>
+struct X0<T*> {
+ template<typename U>
+ void f(U u = T()) { }
+};