Call ActOnStartOfFunctionDecl/ActOnFinishFunctionBody when
instantiating the definition of a function from a template.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71869 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/instantiate-function-1.cpp b/test/SemaTemplate/instantiate-function-1.cpp
index fd79902..482b466 100644
--- a/test/SemaTemplate/instantiate-function-1.cpp
+++ b/test/SemaTemplate/instantiate-function-1.cpp
@@ -1,5 +1,4 @@
// RUN: clang-cc -fsyntax-only -verify %s
-
template<typename T, typename U>
struct X0 {
void f(T x, U y) {
@@ -50,3 +49,12 @@
template struct X4<void>; // expected-note{{in instantiation of template class 'X4<void>' requested here}}
template struct X4<int>; // expected-note{{in instantiation of template class 'X4<int>' requested here}}
+
+struct Incomplete; // expected-note{{forward declaration}}
+
+template<typename T> struct X5 {
+ T f() { } // expected-error{{incomplete result type}}
+};
+void test_X5(X5<Incomplete> x5); // okay!
+
+template struct X5<Incomplete>; // expected-note{{instantiation}}