summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-declref.cpp
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
commitce410662ce75f2b7dc6feb38300720b3d065e875 (patch)
tree50ccc076bd3be96d4ab0492a8f3b555d14ba11f1 /clang/test/SemaTemplate/instantiate-declref.cpp
parent827de51a4a5e0c3e5b9a97df45dd57239f737c9d (diff)
downloadbcm5719-llvm-ce410662ce75f2b7dc6feb38300720b3d065e875.tar.gz
bcm5719-llvm-ce410662ce75f2b7dc6feb38300720b3d065e875.zip
Teach Sema how to instantiate a local function declaration properly. Fixes
PR 5517. llvm-svn: 95470
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-declref.cpp')
-rw-r--r--clang/test/SemaTemplate/instantiate-declref.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-declref.cpp b/clang/test/SemaTemplate/instantiate-declref.cpp
index da8b263ab3a..f883b9361b6 100644
--- a/clang/test/SemaTemplate/instantiate-declref.cpp
+++ b/clang/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>(); }
+}
OpenPOWER on IntegriCloud