[CPP-434] One bad usage is undetected; adjust test accordingly.

This commit is contained in:
Ziemowit Laski
2019-10-08 17:20:25 -07:00
parent bd87d7bc76
commit e617a05a1f
2 changed files with 1 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ bool shortShort1(unsigned short n1, unsigned short delta) {
// clang 8.0.0 -O2: deleted
// gcc 9.2 -O2: deleted
// msvc 19.22 /O2: not deleted
return n1 + delta < n1; // BAD
return n1 + delta < n1; // BAD [NOT DETECTED]
}
bool shortShort2(unsigned short n1, unsigned short delta) {

View File

@@ -1,3 +1,2 @@
| SignedOverflowCheck.cpp:8:12:8:22 | ... < ... | Testing for signed overflow may produce undefined results. |
| SignedOverflowCheck.cpp:18:12:18:26 | ... < ... | Testing for signed overflow may produce undefined results. |
| SignedOverflowCheck.cpp:35:9:35:23 | ... < ... | Testing for signed overflow may produce undefined results. |