summaryrefslogtreecommitdiff
path: root/test/SemaTemplate
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-02-06 01:50:47 +0000
committerJohn McCall <rjmccall@apple.com>2010-02-06 01:50:47 +0000
commit68b6b87b6beb7922fc2c8ab923ba2ce125490363 (patch)
tree220f198bad4343f9bbe8f25f79084e77c85554b3 /test/SemaTemplate
parent2d565b30689c5f79f22de7bad8723c48006d3a06 (diff)
downloadclang-68b6b87b6beb7922fc2c8ab923ba2ce125490363.tar.gz
Teach Sema how to instantiate a local function declaration properly. Fixes
PR 5517. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95470 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate')
-rw-r--r--test/SemaTemplate/instantiate-declref.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-declref.cpp b/test/SemaTemplate/instantiate-declref.cpp
index da8b263ab3..f883b9361b 100644
--- a/test/SemaTemplate/instantiate-declref.cpp
+++ b/test/SemaTemplate/instantiate-declref.cpp
@@ -87,3 +87,11 @@ struct smart_ptr {
void test_smart_ptr(smart_ptr<int> p) {
if (p) { }
}
+
+// PR5517
+namespace test0 {
+ template <int K> struct X {
+ X() { extern void x(); }
+ };
+ void g() { X<2>(); }
+}