summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/delete.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-12-25 14:26:58 +0000
committerdim <dim@FreeBSD.org>2015-12-25 14:26:58 +0000
commit1e9b8d38881c3213d1e67b0c47ab9b2c00721a5c (patch)
tree31a414b9b5f25347b7ed9a8786c34bdb277d6127 /test/SemaCXX/delete.cpp
parent4238dc458ed9a048965af111b979fd51d288f22c (diff)
downloadFreeBSD-src-1e9b8d38881c3213d1e67b0c47ab9b2c00721a5c.zip
FreeBSD-src-1e9b8d38881c3213d1e67b0c47ab9b2c00721a5c.tar.gz
Import clang 3.7.1 release (r255217).
Diffstat (limited to 'test/SemaCXX/delete.cpp')
-rw-r--r--test/SemaCXX/delete.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/SemaCXX/delete.cpp b/test/SemaCXX/delete.cpp
index f94a863..0c853f6 100644
--- a/test/SemaCXX/delete.cpp
+++ b/test/SemaCXX/delete.cpp
@@ -120,6 +120,22 @@ void f() {
DELETE(d); // expected-warning {{'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?}}
}
}
+
+namespace MissingInitializer {
+template<typename T>
+struct Base {
+ struct S {
+ const T *p1 = nullptr;
+ const T *p2 = new T[3];
+ };
+};
+
+void null_init(Base<double>::S s) {
+ delete s.p1;
+ delete s.p2;
+}
+}
+
#ifndef WITH_PCH
pch_test::X::X()
: a(new int[1]) // expected-note{{allocated with 'new[]' here}}
OpenPOWER on IntegriCloud