summaryrefslogtreecommitdiffstats
path: root/libcxx/test/support
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2015-08-28 05:00:25 +0000
committerEric Fiselier <eric@efcs.ca>2015-08-28 05:00:25 +0000
commitfc8e8c036028fb03ceffb22da99c650a1d24b13b (patch)
tree105d805a10ea48bed5fe8a3f8b408c5ffd86e90a /libcxx/test/support
parent6cba53ec6ce8ace92591646de6993518e6ef57f3 (diff)
downloadbcm5719-llvm-fc8e8c036028fb03ceffb22da99c650a1d24b13b.tar.gz
bcm5719-llvm-fc8e8c036028fb03ceffb22da99c650a1d24b13b.zip
Fix bug in test_allocator<void> that used the wrong value to represent object state
llvm-svn: 246270
Diffstat (limited to 'libcxx/test/support')
-rw-r--r--libcxx/test/support/test_allocator.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/test/support/test_allocator.h b/libcxx/test/support/test_allocator.h
index 47ef1d55678..3ca672f89a9 100644
--- a/libcxx/test/support/test_allocator.h
+++ b/libcxx/test/support/test_allocator.h
@@ -171,13 +171,13 @@ public:
template <class U> struct rebind {typedef test_allocator<U> other;};
- test_allocator() throw() : data_(-1) {}
+ test_allocator() throw() : data_(0) {}
explicit test_allocator(int i) throw() : data_(i) {}
test_allocator(const test_allocator& a) throw()
: data_(a.data_) {}
template <class U> test_allocator(const test_allocator<U>& a) throw()
: data_(a.data_) {}
- ~test_allocator() throw() {data_ = 0;}
+ ~test_allocator() throw() {data_ = -1;}
friend bool operator==(const test_allocator& x, const test_allocator& y)
{return x.data_ == y.data_;}
OpenPOWER on IntegriCloud