aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/constructor-template.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-08-24 11:57:43 +0000
committerDouglas Gregor <dgregor@apple.com>2009-08-24 11:57:43 +0000
commitefd5bdad3c2b746db46452c6b13bd3c462dd761d (patch)
tree60235b07db77ca9766d16d5a352e3480438341fb /test/SemaTemplate/constructor-template.cpp
parent55cc2ed722e041228670d26d548e5590e355aced (diff)
Make sure to adjust function template declarations to their templated
declarations (e.g., FunctionTemplateDecl -> CXXConstructorDecl) before performing semantic analysis on the declarations. Fixes PR4761. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79911 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/constructor-template.cpp')
-rw-r--r--test/SemaTemplate/constructor-template.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/SemaTemplate/constructor-template.cpp b/test/SemaTemplate/constructor-template.cpp
index 14df2e2632..5a2630c2cf 100644
--- a/test/SemaTemplate/constructor-template.cpp
+++ b/test/SemaTemplate/constructor-template.cpp
@@ -4,6 +4,10 @@ struct X0 { // expected-note{{candidate}}
X0(int); // expected-note{{candidate}}
template<typename T> X0(T);
template<typename T, typename U> X0(T*, U*);
+
+ // PR4761
+ template<typename T> X0() : f0(T::foo) {}
+ int f0;
};
void accept_X0(X0);