Add -Wconversion to clang builds
MSVC has strong opinions on implicit conversions as used in CI, while Clang both locally and in CI has weaker opinions. In an effort to avoid subsequent roundtrips through CI, make clang more strict. Adding -Wconversion definitely increases the strength of clang's opinions, apparently to include frowning on some that even MSVC considers OK, so go make explicit the current implicit behavior.
This commit is contained in:
committed by
Matthew Parkinson
parent
8840b386bc
commit
6259457790
@@ -369,7 +369,7 @@ namespace snmalloc
|
||||
error("Not allocated by this allocator");
|
||||
}
|
||||
|
||||
large_dealloc(p, 1ULL << size);
|
||||
large_dealloc(p, bits::one_at_bit(size));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -429,9 +429,9 @@ namespace snmalloc
|
||||
if constexpr (location == Start)
|
||||
return ss;
|
||||
else if constexpr (location == End)
|
||||
return pointer_offset(ss, (1ULL << size) - 1ULL);
|
||||
return pointer_offset(ss, (bits::one_at_bit(size)) - 1);
|
||||
else
|
||||
return pointer_offset(ss, 1ULL << size);
|
||||
return pointer_offset(ss, bits::one_at_bit(size));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -472,7 +472,7 @@ namespace snmalloc
|
||||
|
||||
if (likely(size != 0))
|
||||
{
|
||||
return 1ULL << size;
|
||||
return bits::one_at_bit(size);
|
||||
}
|
||||
|
||||
return alloc_size_error();
|
||||
|
||||
Reference in New Issue
Block a user