summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/instantiate-decl-init.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-02-16 09:31:36 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-02-16 09:31:36 +0000
commitfd035e6496665b1f1197868e21cb0a4594e8db6e (patch)
tree53010172e19c77ea447bcd89e117cda052ab52e0 /test/SemaTemplate/instantiate-decl-init.cpp
parent2fce988e86bc01829142e4362d4eff1af0925147 (diff)
downloadFreeBSD-src-fd035e6496665b1f1197868e21cb0a4594e8db6e.zip
FreeBSD-src-fd035e6496665b1f1197868e21cb0a4594e8db6e.tar.gz
Update clang to r96341.
Diffstat (limited to 'test/SemaTemplate/instantiate-decl-init.cpp')
-rw-r--r--test/SemaTemplate/instantiate-decl-init.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-decl-init.cpp b/test/SemaTemplate/instantiate-decl-init.cpp
index b0c2aa8..6b76d72 100644
--- a/test/SemaTemplate/instantiate-decl-init.cpp
+++ b/test/SemaTemplate/instantiate-decl-init.cpp
@@ -20,3 +20,27 @@ void fn(T t, const arg& arg) {
void test() {
fn(1, arg());
}
+
+struct X0 { };
+
+struct X1 {
+ explicit X1(const X0 &x0 = X0());
+};
+
+template<typename T>
+void f0() {
+ X1 x1;
+}
+
+template void f0<int>();
+template void f0<float>();
+
+struct NonTrivial {
+ NonTrivial();
+ ~NonTrivial();
+};
+
+template<int N> void f1() {
+ NonTrivial array[N];
+}
+template<> void f1<2>();
OpenPOWER on IntegriCloud