summaryrefslogtreecommitdiffstats
path: root/libcxx/test
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-08-02 18:39:48 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-08-02 18:39:48 +0000
commitfb2f0a5e01f59b708fdffd614c659e2e035d9da0 (patch)
tree7c1af0f05bce6b934bf4cd252e12bc90d47a7146 /libcxx/test
parent9191865b2d5e6fbda670b6ac9f7f876ecc7f63da (diff)
downloadbcm5719-llvm-fb2f0a5e01f59b708fdffd614c659e2e035d9da0.tar.gz
bcm5719-llvm-fb2f0a5e01f59b708fdffd614c659e2e035d9da0.zip
Andrew Morrow: There are two tests under test/utilities/memory that heap allocate two
integers which remain unused and are subsequently leaked, so the test fail when run under valgrind. Unless I'm overlooking a subtle reason why they are needed I think they can be removed, allowing these tests to pass under valgrind. The attached patch removes the variables. If there is a reason for them to exist, I can change this to just delete them at the end of the test. llvm-svn: 161195
Diffstat (limited to 'libcxx/test')
-rw-r--r--libcxx/test/utilities/memory/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp2
-rw-r--r--libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/cmp_nullptr.pass.cpp2
2 files changed, 0 insertions, 4 deletions
diff --git a/libcxx/test/utilities/memory/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp b/libcxx/test/utilities/memory/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp
index deb615ecb1d..22ae217a61d 100644
--- a/libcxx/test/utilities/memory/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp
+++ b/libcxx/test/utilities/memory/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp
@@ -43,8 +43,6 @@ void do_nothing(int*) {}
int main()
{
- int* ptr1(new int);
- int* ptr2(new int);
const std::unique_ptr<int> p1(new int(1));
assert(!(p1 == nullptr));
assert(!(nullptr == p1));
diff --git a/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/cmp_nullptr.pass.cpp b/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/cmp_nullptr.pass.cpp
index d8d3113fc30..f40cbc3d032 100644
--- a/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/cmp_nullptr.pass.cpp
+++ b/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/cmp_nullptr.pass.cpp
@@ -43,8 +43,6 @@ void do_nothing(int*) {}
int main()
{
- int* ptr1(new int);
- int* ptr2(new int);
const std::shared_ptr<int> p1(new int(1));
assert(!(p1 == nullptr));
assert(!(nullptr == p1));
OpenPOWER on IntegriCloud