diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-06-16 21:09:37 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-06-16 21:09:37 +0000 |
commit | 7dbfb4616377442f6424f903b045b70c29467630 (patch) | |
tree | 65c4dc982ba165c4fc2755e9b5714a9594dc91c4 /clang/test/SemaTemplate/member-function-template.cpp | |
parent | 2c8b829238d4000557ce989c665ab3f73f2e62a9 (diff) | |
download | bcm5719-llvm-7dbfb4616377442f6424f903b045b70c29467630.tar.gz bcm5719-llvm-7dbfb4616377442f6424f903b045b70c29467630.zip |
Canonicalize template template parameters when canonicalizing a
template name that refers to such a parameter. It's amazing that this
problem didn't surface earlier. Fixes PR7387.
llvm-svn: 106147
Diffstat (limited to 'clang/test/SemaTemplate/member-function-template.cpp')
-rw-r--r-- | clang/test/SemaTemplate/member-function-template.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/member-function-template.cpp b/clang/test/SemaTemplate/member-function-template.cpp index aea62855c22..44954ed881a 100644 --- a/clang/test/SemaTemplate/member-function-template.cpp +++ b/clang/test/SemaTemplate/member-function-template.cpp @@ -85,3 +85,19 @@ namespace TTP { void test_f(X<3> x, Y<int> y) { x.f(y); } } + +namespace PR7387 { + template <typename T> struct X {}; + + template <typename T1> struct S { + template <template <typename> class TC> void foo(const TC<T1>& arg); + }; + + template <typename T1> template <template <typename> class TC> + void S<T1>::foo(const TC<T1>& arg) {} + + void test(const X<int>& x) { + S<int> s; + s.foo(x); + } +} |