mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
[CPP-434] Additional test case; improve QHelp by including themes from the BadAdditionOverflowCheck QHelp.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user