This patch fix false positives for loss of sign in addition and subtraction assignment operators.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Looks like you've also added handling of Xor, Or , Div, and Rem. Should there be tests for those?
I added more testcases. There are several undetected "TODO: loss of precision" right now in the tests that I would like to fix. If this patch to fix FP is accepted I will commit it and continue working on the TODO tests. If it's not accepted I will continue investigating the TODO tests anyway..
There are several undetected "TODO: loss of precision" right now in the tests that I would like to fix.
I think it's a good idea to have // no-warning comments as well when testing for lack of false positives.
I've a feeling that the original false positive that you've been fixing initially has disappeared from the final tests (we've got stuff with unsigned long += int, but large types behave quite differently when it comes to integral promotion). If i'm wrong, please commit :)