diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
commit | 461a67fa15370a9ec88f8f8a240bf7c123bb2029 (patch) | |
tree | 6942083d7d56bba40ec790a453ca58ad3baf6832 /test/CodeGenCXX/explicit-instantiation.cpp | |
parent | 75c3240472ba6ac2669ee72ca67eb72d4e2851fc (diff) |
Diffstat (limited to 'test/CodeGenCXX/explicit-instantiation.cpp')
-rw-r--r-- | test/CodeGenCXX/explicit-instantiation.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGenCXX/explicit-instantiation.cpp b/test/CodeGenCXX/explicit-instantiation.cpp index 85857fb6fb8c..ad20abde8f11 100644 --- a/test/CodeGenCXX/explicit-instantiation.cpp +++ b/test/CodeGenCXX/explicit-instantiation.cpp @@ -170,3 +170,22 @@ void use() { f<int>(); } } + +namespace DefaultedMembers { + struct B { B(); B(const B&); ~B(); }; + template<typename T> struct A : B { + A() = default; + ~A() = default; + }; + extern template struct A<int>; + + // CHECK-LABEL: define {{.*}} @_ZN16DefaultedMembers1AIiEC2Ev + // CHECK-LABEL: define {{.*}} @_ZN16DefaultedMembers1AIiED2Ev + A<int> ai; + + // CHECK-LABEL: define {{.*}} @_ZN16DefaultedMembers1AIiEC2ERKS1_ + A<int> ai2(ai); + + // CHECK-NOT: @_ZN16DefaultedMembers1AIcE + template struct A<char>; +} |