Enable the -Wsign-compare warning to better support MSVC
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@289363 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -19,13 +19,13 @@ void do_pointer_comparison_test() {
|
||||
#endif
|
||||
std::vector<std::shared_ptr<T> > pointers;
|
||||
const std::size_t test_size = 100;
|
||||
for (int i=0; i < test_size; ++i)
|
||||
for (size_t i=0; i < test_size; ++i)
|
||||
pointers.push_back(std::shared_ptr<T>(new T()));
|
||||
Compare comp;
|
||||
UIntCompare ucomp;
|
||||
VoidCompare vcomp;
|
||||
for (int i=0; i < test_size; ++i) {
|
||||
for (int j=0; j < test_size; ++j) {
|
||||
for (size_t i=0; i < test_size; ++i) {
|
||||
for (size_t j=0; j < test_size; ++j) {
|
||||
T* lhs = pointers[i].get();
|
||||
T* rhs = pointers[j].get();
|
||||
std::uintptr_t lhs_uint = reinterpret_cast<std::uintptr_t>(lhs);
|
||||
|
||||
@@ -39,7 +39,7 @@ test()
|
||||
if (sizeof(T) <= sizeof(std::size_t))
|
||||
{
|
||||
const std::size_t result = h(t);
|
||||
LIBCPP_ASSERT(result == t);
|
||||
LIBCPP_ASSERT(result == static_cast<size_t>(t));
|
||||
((void)result); // Prevent unused warning
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user