summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/instantiate-local-class.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/instantiate-local-class.cpp')
-rw-r--r--test/SemaTemplate/instantiate-local-class.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-local-class.cpp b/test/SemaTemplate/instantiate-local-class.cpp
index d57ba8a..20b62c1 100644
--- a/test/SemaTemplate/instantiate-local-class.cpp
+++ b/test/SemaTemplate/instantiate-local-class.cpp
@@ -50,3 +50,18 @@ namespace local_class_with_virtual_functions {
struct S { };
void test() { f<S>(); }
}
+
+namespace PR8801 {
+ template<typename T>
+ void foo() {
+ class X;
+ typedef int (X::*pmf_type)();
+ class X : public T { };
+
+ pmf_type pmf = &T::foo;
+ }
+
+ struct Y { int foo(); };
+
+ template void foo<Y>();
+}
OpenPOWER on IntegriCloud