When instantiating a function template declaration that was expressed
via a typedef of a function, make sure to synthesize parameter
declarations. Fixes PR9654 / <rdar://problem/9257497>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133628 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/instantiate-function-2.cpp b/test/SemaTemplate/instantiate-function-2.cpp
index ebc0ef3..b4c0d9d 100644
--- a/test/SemaTemplate/instantiate-function-2.cpp
+++ b/test/SemaTemplate/instantiate-function-2.cpp
@@ -31,3 +31,14 @@
foo<int>(); // expected-note{{instantiation of}}
}
}
+
+namespace PR9654 {
+ typedef void ftype(int);
+
+ template<typename T>
+ ftype f;
+
+ void g() {
+ f<int>(0);
+ }
+}