WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit e4a1a69

Browse files
Fix InvariantCondition.qll comment, test expectations
1 parent f0c5cd9 commit e4a1a69

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

cpp/common/src/codingstandards/cpp/rules/invariantcondition/InvariantCondition.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private module Impl {
123123
isEqual = true and
124124
infeasiblePath = true
125125
or
126-
// Equal to/always true
126+
// Equal to/always false
127127
// If the largest value of the greater operand is less than or equal to the smallest value of
128128
// the lesser operand, then the LT/GT comparison is always false
129129
// Example: [6..10] < [0..6]
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
| test.cpp:12:7:12:13 | ... >= ... | The false path is infeasible because 0 (max value: 0) is always less than or equal to a (minimum value: 0). |
2-
| test.cpp:15:7:15:22 | ... <= ... | The false path is infeasible because a (max value: 4294967295) is always less than or equal to 4294967295 (minimum value: 4294967295). |
3-
| test.cpp:22:7:22:13 | ... < ... | The false path is infeasible because l1 (max value: 2) is always less than 10 (minimum value: 10). |
4-
| test.cpp:36:7:36:7 | 0 | The path is unreachable in a template. |
5-
| test.cpp:40:7:40:14 | call to isVal | The false path is infeasible because this expression consists of constants which evaluate to true. |
6-
| test.cpp:61:10:61:14 | 0 | The true path is infeasible because this expression consists of constants which evaluate to false. |
7-
| test.cpp:68:12:68:13 | 10 | The false path is infeasible because this expression consists of constants which evaluate to true. |
8-
| test.cpp:72:14:72:14 | x | The false path is infeasible because this expression consists of constants which evaluate to true. |
9-
| test.cpp:94:12:94:16 | 0 | The true path is infeasible because this expression consists of constants which evaluate to false. |
10-
| test.cpp:98:12:98:15 | 1 | The false path is infeasible because this expression consists of constants which evaluate to true. |
11-
| test.cpp:101:3:101:17 | 1 | The false path is infeasible because this expression consists of constants which evaluate to true. |
12-
| test.cpp:103:3:103:15 | 0 | The true path is infeasible because this expression consists of constants which evaluate to false. |
13-
| test.cpp:106:5:106:17 | 0 | The true path is infeasible because this expression consists of constants which evaluate to false. |
14-
| test.cpp:107:12:107:16 | 0 | The true path is infeasible because this expression consists of constants which evaluate to false. |
15-
| test.cpp:111:7:111:7 | 1 | The false path is infeasible because this expression consists of constants which evaluate to true. |
1+
| test.cpp:11:7:11:13 | ... >= ... | The false path is infeasible because 0 (max value: 0) is always less than or equal to a (minimum value: 0). |
2+
| test.cpp:14:7:14:22 | ... <= ... | The false path is infeasible because a (max value: 4294967295) is always less than or equal to 4294967295 (minimum value: 4294967295). |
3+
| test.cpp:21:7:21:13 | ... < ... | The false path is infeasible because l1 (max value: 2) is always less than 10 (minimum value: 10). |
4+
| test.cpp:37:7:37:7 | 0 | The path is unreachable in a template. |
5+
| test.cpp:41:7:41:14 | call to isVal | The false path is infeasible because this expression consists of constants which evaluate to true. |
6+
| test.cpp:62:10:62:14 | 0 | The true path is infeasible because this expression consists of constants which evaluate to false. |
7+
| test.cpp:69:12:69:13 | 10 | The false path is infeasible because this expression consists of constants which evaluate to true. |
8+
| test.cpp:73:14:73:14 | x | The false path is infeasible because this expression consists of constants which evaluate to true. |
9+
| test.cpp:95:12:95:16 | 0 | The true path is infeasible because this expression consists of constants which evaluate to false. |
10+
| test.cpp:99:12:99:15 | 1 | The false path is infeasible because this expression consists of constants which evaluate to true. |
11+
| test.cpp:102:3:102:17 | 1 | The false path is infeasible because this expression consists of constants which evaluate to true. |
12+
| test.cpp:104:3:104:15 | 0 | The true path is infeasible because this expression consists of constants which evaluate to false. |
13+
| test.cpp:107:5:107:17 | 0 | The true path is infeasible because this expression consists of constants which evaluate to false. |
14+
| test.cpp:108:12:108:16 | 0 | The true path is infeasible because this expression consists of constants which evaluate to false. |
15+
| test.cpp:112:7:112:7 | 1 | The false path is infeasible because this expression consists of constants which evaluate to true. |

0 commit comments

Comments
 (0)