[CPP-434] Additional test case; improve QHelp by including themes from the BadAdditionOverflowCheck QHelp.

This commit is contained in:
Ziemowit Laski
2019-10-17 16:41:17 -07:00
parent fb625c12ef
commit 70441edacf
5 changed files with 23 additions and 5 deletions

View File

@@ -112,3 +112,7 @@ bool multipleCasts2(char x) {
// msvc 19.22 /O2: not deleted
return (int)(unsigned short)(x + '1') < (int)(unsigned short)x; // GOOD [FALSE POSITIVE]
}
int does_it_overflow(int n1, unsigned short delta) {
return n1 + (unsigned)delta < n1; // GOOD
}