negateS -> negateI
The same negate should work fine for unsigned, right?
This seems to eliminate the need for kInvaid.
~ $ cat test.c
int main(void) {
unsigned u = 0;
do {
unsigned nu = -u,
ns = -(int)u;
if (nu != ns) {
return 1;
}
} while (++u != 0);
return 0;
}
~ $ clang -Os test.c
~ $ ./a.out && echo ok
ok
Change-Id: If4eec8aa24dce634e3196c8631adec4362a3b69b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215045
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
3 files changed