summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-function-1.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-05-15 17:59:04 +0000
committerDouglas Gregor <dgregor@apple.com>2009-05-15 17:59:04 +0000
commit67da0d97e6790cc554aa0ca9986ee8651797caaf (patch)
tree3086e239dd27a2699a77f841695f92f6084a797b /clang/test/SemaTemplate/instantiate-function-1.cpp
parentf6e9ece5075a5ea007922ef72246470653fade1b (diff)
downloadbcm5719-llvm-67da0d97e6790cc554aa0ca9986ee8651797caaf.tar.gz
bcm5719-llvm-67da0d97e6790cc554aa0ca9986ee8651797caaf.zip
Call ActOnStartOfFunctionDecl/ActOnFinishFunctionBody when
instantiating the definition of a function from a template. llvm-svn: 71869
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-function-1.cpp')
-rw-r--r--clang/test/SemaTemplate/instantiate-function-1.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/test/SemaTemplate/instantiate-function-1.cpp b/clang/test/SemaTemplate/instantiate-function-1.cpp
index fd79902fdc9..482b466e845 100644
--- a/clang/test/SemaTemplate/instantiate-function-1.cpp
+++ b/clang/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 <typename T> struct X4 {
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}}
OpenPOWER on IntegriCloud