Author: ericwf Date: Fri Aug 28 00:00:25 2015 New Revision: 246270 URL: http://llvm.org/viewvc/llvm-project?rev=246270&view=rev Log: Fix bug in test_allocator<void> that used the wrong value to represent object state
Modified: libcxx/trunk/test/support/test_allocator.h Modified: libcxx/trunk/test/support/test_allocator.h URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/test_allocator.h?rev=246270&r1=246269&r2=246270&view=diff ============================================================================== --- libcxx/trunk/test/support/test_allocator.h (original) +++ libcxx/trunk/test/support/test_allocator.h Fri Aug 28 00:00:25 2015 @@ -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_;} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits