diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2010-11-08 23:29:42 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2010-11-08 23:29:42 +0000 |
commit | 614789164879b7277c590225f3a0a8c227af2d9e (patch) | |
tree | 6f4b11178cfb01ab64d7c10faeddb0a9e06364e3 /clang/test/SemaTemplate/class-template-decl.cpp | |
parent | c7baee31adebb87db3cb7fead407ace32c562d0b (diff) | |
download | bcm5719-llvm-614789164879b7277c590225f3a0a8c227af2d9e.tar.gz bcm5719-llvm-614789164879b7277c590225f3a0a8c227af2d9e.zip |
Don't lose track of previous-declarations when instantiating a class template.
Fixes PR8001.
llvm-svn: 118454
Diffstat (limited to 'clang/test/SemaTemplate/class-template-decl.cpp')
-rw-r--r-- | clang/test/SemaTemplate/class-template-decl.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/class-template-decl.cpp b/clang/test/SemaTemplate/class-template-decl.cpp index 1be1bc070a8..e7722123f9c 100644 --- a/clang/test/SemaTemplate/class-template-decl.cpp +++ b/clang/test/SemaTemplate/class-template-decl.cpp @@ -56,3 +56,21 @@ namespace M { } template<typename T> class M::C3 { }; // expected-error{{out-of-line definition of 'C3' does not match any declaration in namespace 'M'}} + +namespace PR8001 { + template<typename T1> + struct Foo { + template<typename T2> class Bar; + typedef Bar<T1> Baz; + + template<typename T2> + struct Bar { + Bar() {} + }; + }; + + void pr8001() { + Foo<int>::Baz x; + Foo<int>::Bar<int> y(x); + } +} |