summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/instantiate-local-class.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
commitbca07a4524feb4edec581062d631a13116320a24 (patch)
treea9243275843fbeaa590afc07ee888e006b8d54ea /test/SemaTemplate/instantiate-local-class.cpp
parent998bc5802ecdd65ce3b270f6c69a8ae8557f0a10 (diff)
Notes
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 d57ba8a68288b..20b62c1e537eb 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>();
+}