C++: Improve isGuarded.

This commit is contained in:
Geoffrey White
2021-04-06 17:59:22 +01:00
parent 59ff3f315b
commit 3ecd13531f
3 changed files with 10 additions and 8 deletions

View File

@@ -17,8 +17,6 @@
| test.cpp:137:6:137:14 | ... > ... | Unsigned subtraction can never be negative. |
| test.cpp:146:7:146:15 | ... > ... | Unsigned subtraction can never be negative. |
| test.cpp:152:7:152:15 | ... > ... | Unsigned subtraction can never be negative. |
| test.cpp:156:7:156:15 | ... > ... | Unsigned subtraction can never be negative. |
| test.cpp:169:6:169:14 | ... > ... | Unsigned subtraction can never be negative. |
| test.cpp:182:6:182:14 | ... > ... | Unsigned subtraction can never be negative. |
| test.cpp:195:6:195:14 | ... > ... | Unsigned subtraction can never be negative. |
| test.cpp:208:6:208:14 | ... > ... | Unsigned subtraction can never be negative. |

View File

@@ -153,7 +153,7 @@ void test8() {
// ...
}
} else {
if (a - b > 0) { // GOOD (as a > b) [FALSE POSITIVE]
if (a - b > 0) { // GOOD (as a > b)
// ...
}
}
@@ -166,7 +166,7 @@ void test8() {
if (a < b) return;
if (a - b > 0) { // GOOD (as a >= b) [FALSE POSITIVE]
if (a - b > 0) { // GOOD (as a >= b)
// ...
}
}