diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-12-21 21:22:51 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-12-21 21:22:51 +0000 |
commit | e9fc8dc84c4da2e9aea44c6e1a7bcc2af99d91c2 (patch) | |
tree | d31e8804755d7370a528825b2ee538840866bec4 /clang/test/SemaTemplate/instantiate-local-class.cpp | |
parent | 87c47499c6e2e5c3b6c0bac04ce9e6782bf6059c (diff) | |
download | bcm5719-llvm-e9fc8dc84c4da2e9aea44c6e1a7bcc2af99d91c2.tar.gz bcm5719-llvm-e9fc8dc84c4da2e9aea44c6e1a7bcc2af99d91c2.zip |
When searching for the instantiation of a locally-scoped tag
declaration, also look for an instantiation of its previous
declarations. Fixes PR8801.
llvm-svn: 122361
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>(); +} |