summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/constructor-init.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
committerdim <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
commit554bcb69c2d785a011a30e7db87a36a87fe7db10 (patch)
tree9abb1a658a297776086f4e0dfa6ca533de02104e /test/CodeGenCXX/constructor-init.cpp
parentbb67ca86b31f67faee50bd10c3b036d65751745a (diff)
downloadFreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.zip
FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.tar.gz
Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
Diffstat (limited to 'test/CodeGenCXX/constructor-init.cpp')
-rw-r--r--test/CodeGenCXX/constructor-init.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGenCXX/constructor-init.cpp b/test/CodeGenCXX/constructor-init.cpp
index 9f808f6..b33184e 100644
--- a/test/CodeGenCXX/constructor-init.cpp
+++ b/test/CodeGenCXX/constructor-init.cpp
@@ -131,6 +131,26 @@ namespace rdar9694300 {
}
}
+// Check that we emit a zero initialization step for list-value-initialization
+// which calls a trivial default constructor.
+namespace PR13273 {
+ struct U {
+ int t;
+ U() = default;
+ };
+
+ struct S : U {
+ S() = default;
+ };
+
+ // CHECK: define {{.*}}@_ZN7PR132731fEv(
+ int f() {
+ // CHECK-NOT: }
+ // CHECK: llvm.memset{{.*}}i8 0
+ return (new S{})->t;
+ }
+}
+
template<typename T>
struct X {
X(const X &);
OpenPOWER on IntegriCloud