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 | 37574f55cd637340f651330f5cfda69742880d36 (patch) | |
tree | aeb0fc10d8c2a397e3cc1744c2af24b93c5f6f5b /test/SemaTemplate/class-template-decl.cpp | |
parent | ed171b80e49c1ef3dcb9c2aa238cc50340ac6e90 (diff) |
Don't lose track of previous-declarations when instantiating a class template.
Fixes PR8001.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/class-template-decl.cpp')
-rw-r--r-- | test/SemaTemplate/class-template-decl.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/SemaTemplate/class-template-decl.cpp b/test/SemaTemplate/class-template-decl.cpp index 1be1bc070a..e7722123f9 100644 --- a/test/SemaTemplate/class-template-decl.cpp +++ b/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); + } +} |