diff options
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-local-class.cpp')
-rw-r--r-- | clang/test/SemaTemplate/instantiate-local-class.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-local-class.cpp b/clang/test/SemaTemplate/instantiate-local-class.cpp index d57ba8a6828..954fd650858 100644 --- a/clang/test/SemaTemplate/instantiate-local-class.cpp +++ b/clang/test/SemaTemplate/instantiate-local-class.cpp @@ -50,3 +50,16 @@ namespace local_class_with_virtual_functions { struct S { }; void test() { f<S>(); } } + +namespace PR8801 { + template<typename T> + void foo() { + class X; + int (X::*pmf)(T) = 0; + class X : public T { }; + } + + struct Y { }; + + template void foo<Y>(); +} |