diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-10 00:12:48 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-10 00:12:48 +0000 |
commit | e61ef62cc2a796c27d0d7d12cd171589f14ed225 (patch) | |
tree | 6bbd4691c055c7d28d2eb0ce476992f473dbda9f /clang/test/SemaTemplate/nested-template.cpp | |
parent | 7b40b5a24397bf996b28e9d99c014dd17a47802b (diff) | |
download | bcm5719-llvm-e61ef62cc2a796c27d0d7d12cd171589f14ed225.tar.gz bcm5719-llvm-e61ef62cc2a796c27d0d7d12cd171589f14ed225.zip |
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>.
llvm-svn: 81407
Diffstat (limited to 'clang/test/SemaTemplate/nested-template.cpp')
-rw-r--r-- | clang/test/SemaTemplate/nested-template.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/nested-template.cpp b/clang/test/SemaTemplate/nested-template.cpp index 896eb723984..5ee2c995400 100644 --- a/clang/test/SemaTemplate/nested-template.cpp +++ b/clang/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()) { } +}; |