Page MenuHomePhabricator

[analyzer] Add checker for underflowing unsigned integers

Authored by pfultz2 on Apr 25 2018, 8:19 AM.



This will check for when assigning a negative value to an unsigned integer, when it happens implicitly.

Diff Detail

rC Clang

Event Timeline

pfultz2 created this revision.Apr 25 2018, 8:19 AM

Isn't this case already covered by conversion checker?

I was unaware of this. This looks like it only works for binary operators. So f(-1) won't get caught.

pfultz2 abandoned this revision.Apr 25 2018, 2:05 PM

So I submitted my change to the ConversionChecker, instead.