summaryrefslogtreecommitdiffstats
path: root/clang/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
commitc8c277a1b33cdde021c29b06af53c36a005bfb23 (patch)
treeca8511cf38dba1e4717f33bbc1f253c565948a50 /clang/test/SemaTemplate/constructor-template.cpp
parent582d61026dc6b81173f14f36914e381d9a74f4a8 (diff)
downloadbcm5719-llvm-c8c277a1b33cdde021c29b06af53c36a005bfb23.tar.gz
bcm5719-llvm-c8c277a1b33cdde021c29b06af53c36a005bfb23.zip
Make sure to adjust function template declarations to their templated
declarations (e.g., FunctionTemplateDecl -> CXXConstructorDecl) before performing semantic analysis on the declarations. Fixes PR4761. llvm-svn: 79911
Diffstat (limited to 'clang/test/SemaTemplate/constructor-template.cpp')
-rw-r--r--clang/test/SemaTemplate/constructor-template.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/constructor-template.cpp b/clang/test/SemaTemplate/constructor-template.cpp
index 14df2e2632a..5a2630c2cff 100644
--- a/clang/test/SemaTemplate/constructor-template.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud