summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/deduction.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-10-12 19:40:14 +0000
committerJohn McCall <rjmccall@apple.com>2010-10-12 19:40:14 +0000
commitdf41f18936693f7c62e457eefb9fad5b2d2fe3cd (patch)
tree7d6b4d82a188e9cef06bb28ac52e58be23b7422e /test/SemaTemplate/deduction.cpp
parent3273b0cea879c7af345d6bf98502bbf73fc4fde1 (diff)
downloadclang-df41f18936693f7c62e457eefb9fad5b2d2fe3cd.tar.gz
clang-df41f18936693f7c62e457eefb9fad5b2d2fe3cd.tar.bz2
clang-df41f18936693f7c62e457eefb9fad5b2d2fe3cd.tar.xz
Enter the context of the declared function template when performing
deduction and the final substitution, but not while substituting the explicit template arguments. Fixes rdar://problem/8537391 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116332 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/deduction.cpp')
-rw-r--r--test/SemaTemplate/deduction.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/SemaTemplate/deduction.cpp b/test/SemaTemplate/deduction.cpp
index 9400a0aba9..cf98d6e0ac 100644
--- a/test/SemaTemplate/deduction.cpp
+++ b/test/SemaTemplate/deduction.cpp
@@ -134,3 +134,19 @@ namespace test2 {
f(0, p);
}
}
+
+// rdar://problem/8537391
+namespace test3 {
+ struct Foo {
+ template <void F(char)> static inline void foo();
+ };
+
+ class Bar {
+ template<typename T> static inline void wobble(T ch);
+
+ public:
+ static void madness() {
+ Foo::foo<wobble<char> >();
+ }
+ };
+}