aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/instantiate-local-class.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-12-21 21:22:51 +0000
committerDouglas Gregor <dgregor@apple.com>2010-12-21 21:22:51 +0000
commitebb1c56a4b7a944921b564025df53505ff886050 (patch)
treec447b91c2617d6a15feb3ec9f58338599df9caa0 /test/SemaTemplate/instantiate-local-class.cpp
parentb68e39930d06ed81a2b431dc09e4cb97e5c0d57a (diff)
When searching for the instantiation of a locally-scoped tag
declaration, also look for an instantiation of its previous declarations. Fixes PR8801. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122361 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/instantiate-local-class.cpp')
-rw-r--r--test/SemaTemplate/instantiate-local-class.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-local-class.cpp b/test/SemaTemplate/instantiate-local-class.cpp
index d57ba8a682..954fd65085 100644
--- a/test/SemaTemplate/instantiate-local-class.cpp
+++ b/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>();
+}