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
@@ -194,18 +194,20 @@ int main(int, char**)
|
||||
printf("\n");
|
||||
for (size_t exp = 1; exp < snmalloc::SUPERSLAB_BITS; exp++)
|
||||
{
|
||||
f(1ULL << exp);
|
||||
f(3ULL << exp);
|
||||
f(5ULL << exp);
|
||||
f(7ULL << exp);
|
||||
f((1ULL << exp) + 1);
|
||||
f((3ULL << exp) + 1);
|
||||
f((5ULL << exp) + 1);
|
||||
f((7ULL << exp) + 1);
|
||||
f((1ULL << exp) - 1);
|
||||
f((3ULL << exp) - 1);
|
||||
f((5ULL << exp) - 1);
|
||||
f((7ULL << exp) - 1);
|
||||
auto shifted = [exp](size_t v) { return v << exp; };
|
||||
|
||||
f(shifted(1));
|
||||
f(shifted(3));
|
||||
f(shifted(5));
|
||||
f(shifted(7));
|
||||
f(shifted(1) + 1);
|
||||
f(shifted(3) + 1);
|
||||
f(shifted(5) + 1);
|
||||
f(shifted(7) + 1);
|
||||
f(shifted(1) - 1);
|
||||
f(shifted(3) - 1);
|
||||
f(shifted(5) - 1);
|
||||
f(shifted(7) - 1);
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user