mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C++: Add tests.
This commit is contained in:
@@ -44,6 +44,8 @@
|
||||
| test.c:198:8:198:8 | b |
|
||||
| test.c:206:7:206:8 | ! ... |
|
||||
| test.c:206:8:206:8 | c |
|
||||
| test.c:215:6:215:18 | call to __builtin_expect |
|
||||
| test.c:219:9:219:22 | call to __builtin_expect |
|
||||
| test.cpp:18:8:18:10 | call to get |
|
||||
| test.cpp:31:7:31:13 | ... == ... |
|
||||
| test.cpp:42:13:42:20 | call to getABool |
|
||||
@@ -92,3 +94,15 @@
|
||||
| test.cpp:241:9:241:43 | ... && ... |
|
||||
| test.cpp:241:22:241:30 | ... == ... |
|
||||
| test.cpp:241:35:241:43 | ... == ... |
|
||||
| test.cpp:247:6:247:18 | ... == ... |
|
||||
| test.cpp:253:6:253:18 | ... != ... |
|
||||
| test.cpp:260:6:260:18 | ... == ... |
|
||||
| test.cpp:266:6:266:18 | ... != ... |
|
||||
| test.cpp:273:6:273:17 | ... == ... |
|
||||
| test.cpp:279:6:279:17 | ... != ... |
|
||||
| test.cpp:287:6:287:19 | ... == ... |
|
||||
| test.cpp:293:6:293:19 | ... != ... |
|
||||
| test.cpp:300:6:300:19 | ... == ... |
|
||||
| test.cpp:306:6:306:19 | ... != ... |
|
||||
| test.cpp:312:6:312:18 | ... == ... |
|
||||
| test.cpp:318:6:318:18 | ... != ... |
|
||||
|
||||
@@ -356,6 +356,14 @@
|
||||
| test.c:206:8:206:8 | c | ! ... == 1 when c is false |
|
||||
| test.c:206:8:206:8 | c | c != 0 when c is true |
|
||||
| test.c:206:8:206:8 | c | c == 0 when c is false |
|
||||
| test.c:215:6:215:18 | call to __builtin_expect | call to __builtin_expect != 0 when call to __builtin_expect is true |
|
||||
| test.c:215:6:215:18 | call to __builtin_expect | call to __builtin_expect != 1 when call to __builtin_expect is false |
|
||||
| test.c:215:6:215:18 | call to __builtin_expect | call to __builtin_expect == 0 when call to __builtin_expect is false |
|
||||
| test.c:215:6:215:18 | call to __builtin_expect | call to __builtin_expect == 1 when call to __builtin_expect is true |
|
||||
| test.c:219:9:219:22 | call to __builtin_expect | call to __builtin_expect != 0 when call to __builtin_expect is true |
|
||||
| test.c:219:9:219:22 | call to __builtin_expect | call to __builtin_expect != 1 when call to __builtin_expect is false |
|
||||
| test.c:219:9:219:22 | call to __builtin_expect | call to __builtin_expect == 0 when call to __builtin_expect is false |
|
||||
| test.c:219:9:219:22 | call to __builtin_expect | call to __builtin_expect == 1 when call to __builtin_expect is true |
|
||||
| test.cpp:18:8:18:10 | call to get | call to get != 0 when call to get is true |
|
||||
| test.cpp:18:8:18:10 | call to get | call to get != 1 when call to get is false |
|
||||
| test.cpp:18:8:18:10 | call to get | call to get == 0 when call to get is false |
|
||||
@@ -803,3 +811,119 @@
|
||||
| test.cpp:241:35:241:43 | ... == ... | i != 0+0 when ... == ... is false |
|
||||
| test.cpp:241:35:241:43 | ... == ... | i == 0 when ... == ... is true |
|
||||
| test.cpp:241:35:241:43 | ... == ... | i == 0+0 when ... == ... is true |
|
||||
| test.cpp:247:6:247:18 | ... == ... | 0 != ... == ...+0 when ... == ... is false |
|
||||
| test.cpp:247:6:247:18 | ... == ... | 0 == ... == ...+0 when ... == ... is true |
|
||||
| test.cpp:247:6:247:18 | ... == ... | ... == ... != 0 when ... == ... is false |
|
||||
| test.cpp:247:6:247:18 | ... == ... | ... == ... != 0 when ... == ... is true |
|
||||
| test.cpp:247:6:247:18 | ... == ... | ... == ... != 0+0 when ... == ... is false |
|
||||
| test.cpp:247:6:247:18 | ... == ... | ... == ... != 1 when ... == ... is false |
|
||||
| test.cpp:247:6:247:18 | ... == ... | ... == ... == 0 when ... == ... is false |
|
||||
| test.cpp:247:6:247:18 | ... == ... | ... == ... == 0 when ... == ... is true |
|
||||
| test.cpp:247:6:247:18 | ... == ... | ... == ... == 0+0 when ... == ... is true |
|
||||
| test.cpp:247:6:247:18 | ... == ... | ... == ... == 1 when ... == ... is true |
|
||||
| test.cpp:253:6:253:18 | ... != ... | 0 != ... == ...+0 when ... != ... is true |
|
||||
| test.cpp:253:6:253:18 | ... != ... | 0 == ... == ...+0 when ... != ... is false |
|
||||
| test.cpp:253:6:253:18 | ... != ... | ... != ... != 0 when ... != ... is true |
|
||||
| test.cpp:253:6:253:18 | ... != ... | ... != ... != 1 when ... != ... is false |
|
||||
| test.cpp:253:6:253:18 | ... != ... | ... != ... == 0 when ... != ... is false |
|
||||
| test.cpp:253:6:253:18 | ... != ... | ... != ... == 1 when ... != ... is true |
|
||||
| test.cpp:253:6:253:18 | ... != ... | ... == ... != 0 when ... != ... is true |
|
||||
| test.cpp:253:6:253:18 | ... != ... | ... == ... != 0+0 when ... != ... is true |
|
||||
| test.cpp:253:6:253:18 | ... != ... | ... == ... == 0 when ... != ... is false |
|
||||
| test.cpp:253:6:253:18 | ... != ... | ... == ... == 0+0 when ... != ... is false |
|
||||
| test.cpp:260:6:260:18 | ... == ... | 0 != ... != ...+0 when ... == ... is false |
|
||||
| test.cpp:260:6:260:18 | ... == ... | 0 == ... != ...+0 when ... == ... is true |
|
||||
| test.cpp:260:6:260:18 | ... == ... | ... != ... != 0 when ... == ... is false |
|
||||
| test.cpp:260:6:260:18 | ... == ... | ... != ... != 0+0 when ... == ... is false |
|
||||
| test.cpp:260:6:260:18 | ... == ... | ... != ... == 0 when ... == ... is true |
|
||||
| test.cpp:260:6:260:18 | ... == ... | ... != ... == 0+0 when ... == ... is true |
|
||||
| test.cpp:260:6:260:18 | ... == ... | ... == ... != 0 when ... == ... is true |
|
||||
| test.cpp:260:6:260:18 | ... == ... | ... == ... != 1 when ... == ... is false |
|
||||
| test.cpp:260:6:260:18 | ... == ... | ... == ... == 0 when ... == ... is false |
|
||||
| test.cpp:260:6:260:18 | ... == ... | ... == ... == 1 when ... == ... is true |
|
||||
| test.cpp:266:6:266:18 | ... != ... | 0 != ... != ...+0 when ... != ... is true |
|
||||
| test.cpp:266:6:266:18 | ... != ... | 0 == ... != ...+0 when ... != ... is false |
|
||||
| test.cpp:266:6:266:18 | ... != ... | ... != ... != 0 when ... != ... is true |
|
||||
| test.cpp:266:6:266:18 | ... != ... | ... != ... != 0+0 when ... != ... is true |
|
||||
| test.cpp:266:6:266:18 | ... != ... | ... != ... != 1 when ... != ... is false |
|
||||
| test.cpp:266:6:266:18 | ... != ... | ... != ... == 0 when ... != ... is false |
|
||||
| test.cpp:266:6:266:18 | ... != ... | ... != ... == 0+0 when ... != ... is false |
|
||||
| test.cpp:266:6:266:18 | ... != ... | ... != ... == 1 when ... != ... is true |
|
||||
| test.cpp:273:6:273:17 | ... == ... | 0 != ... < ...+0 when ... == ... is false |
|
||||
| test.cpp:273:6:273:17 | ... == ... | 0 == ... < ...+0 when ... == ... is true |
|
||||
| test.cpp:273:6:273:17 | ... == ... | ... < ... != 0 when ... == ... is false |
|
||||
| test.cpp:273:6:273:17 | ... == ... | ... < ... != 0+0 when ... == ... is false |
|
||||
| test.cpp:273:6:273:17 | ... == ... | ... < ... == 0 when ... == ... is true |
|
||||
| test.cpp:273:6:273:17 | ... == ... | ... < ... == 0+0 when ... == ... is true |
|
||||
| test.cpp:273:6:273:17 | ... == ... | ... == ... != 0 when ... == ... is true |
|
||||
| test.cpp:273:6:273:17 | ... == ... | ... == ... != 1 when ... == ... is false |
|
||||
| test.cpp:273:6:273:17 | ... == ... | ... == ... == 0 when ... == ... is false |
|
||||
| test.cpp:273:6:273:17 | ... == ... | ... == ... == 1 when ... == ... is true |
|
||||
| test.cpp:279:6:279:17 | ... != ... | 0 != ... < ...+0 when ... != ... is true |
|
||||
| test.cpp:279:6:279:17 | ... != ... | 0 == ... < ...+0 when ... != ... is false |
|
||||
| test.cpp:279:6:279:17 | ... != ... | ... != ... != 0 when ... != ... is true |
|
||||
| test.cpp:279:6:279:17 | ... != ... | ... != ... != 1 when ... != ... is false |
|
||||
| test.cpp:279:6:279:17 | ... != ... | ... != ... == 0 when ... != ... is false |
|
||||
| test.cpp:279:6:279:17 | ... != ... | ... != ... == 1 when ... != ... is true |
|
||||
| test.cpp:279:6:279:17 | ... != ... | ... < ... != 0 when ... != ... is true |
|
||||
| test.cpp:279:6:279:17 | ... != ... | ... < ... != 0+0 when ... != ... is true |
|
||||
| test.cpp:279:6:279:17 | ... != ... | ... < ... == 0 when ... != ... is false |
|
||||
| test.cpp:279:6:279:17 | ... != ... | ... < ... == 0+0 when ... != ... is false |
|
||||
| test.cpp:287:6:287:19 | ... == ... | 0 != ... == ...+0 when ... == ... is false |
|
||||
| test.cpp:287:6:287:19 | ... == ... | 0 == ... == ...+0 when ... == ... is true |
|
||||
| test.cpp:287:6:287:19 | ... == ... | ... == ... != 0 when ... == ... is false |
|
||||
| test.cpp:287:6:287:19 | ... == ... | ... == ... != 0 when ... == ... is true |
|
||||
| test.cpp:287:6:287:19 | ... == ... | ... == ... != 0+0 when ... == ... is false |
|
||||
| test.cpp:287:6:287:19 | ... == ... | ... == ... != 1 when ... == ... is false |
|
||||
| test.cpp:287:6:287:19 | ... == ... | ... == ... == 0 when ... == ... is false |
|
||||
| test.cpp:287:6:287:19 | ... == ... | ... == ... == 0 when ... == ... is true |
|
||||
| test.cpp:287:6:287:19 | ... == ... | ... == ... == 0+0 when ... == ... is true |
|
||||
| test.cpp:287:6:287:19 | ... == ... | ... == ... == 1 when ... == ... is true |
|
||||
| test.cpp:293:6:293:19 | ... != ... | 0 != ... == ...+0 when ... != ... is true |
|
||||
| test.cpp:293:6:293:19 | ... != ... | 0 == ... == ...+0 when ... != ... is false |
|
||||
| test.cpp:293:6:293:19 | ... != ... | ... != ... != 0 when ... != ... is true |
|
||||
| test.cpp:293:6:293:19 | ... != ... | ... != ... != 1 when ... != ... is false |
|
||||
| test.cpp:293:6:293:19 | ... != ... | ... != ... == 0 when ... != ... is false |
|
||||
| test.cpp:293:6:293:19 | ... != ... | ... != ... == 1 when ... != ... is true |
|
||||
| test.cpp:293:6:293:19 | ... != ... | ... == ... != 0 when ... != ... is true |
|
||||
| test.cpp:293:6:293:19 | ... != ... | ... == ... != 0+0 when ... != ... is true |
|
||||
| test.cpp:293:6:293:19 | ... != ... | ... == ... == 0 when ... != ... is false |
|
||||
| test.cpp:293:6:293:19 | ... != ... | ... == ... == 0+0 when ... != ... is false |
|
||||
| test.cpp:300:6:300:19 | ... == ... | 0 != ... != ...+0 when ... == ... is false |
|
||||
| test.cpp:300:6:300:19 | ... == ... | 0 == ... != ...+0 when ... == ... is true |
|
||||
| test.cpp:300:6:300:19 | ... == ... | ... != ... != 0 when ... == ... is false |
|
||||
| test.cpp:300:6:300:19 | ... == ... | ... != ... != 0+0 when ... == ... is false |
|
||||
| test.cpp:300:6:300:19 | ... == ... | ... != ... == 0 when ... == ... is true |
|
||||
| test.cpp:300:6:300:19 | ... == ... | ... != ... == 0+0 when ... == ... is true |
|
||||
| test.cpp:300:6:300:19 | ... == ... | ... == ... != 0 when ... == ... is true |
|
||||
| test.cpp:300:6:300:19 | ... == ... | ... == ... != 1 when ... == ... is false |
|
||||
| test.cpp:300:6:300:19 | ... == ... | ... == ... == 0 when ... == ... is false |
|
||||
| test.cpp:300:6:300:19 | ... == ... | ... == ... == 1 when ... == ... is true |
|
||||
| test.cpp:306:6:306:19 | ... != ... | 0 != ... != ...+0 when ... != ... is true |
|
||||
| test.cpp:306:6:306:19 | ... != ... | 0 == ... != ...+0 when ... != ... is false |
|
||||
| test.cpp:306:6:306:19 | ... != ... | ... != ... != 0 when ... != ... is true |
|
||||
| test.cpp:306:6:306:19 | ... != ... | ... != ... != 0+0 when ... != ... is true |
|
||||
| test.cpp:306:6:306:19 | ... != ... | ... != ... != 1 when ... != ... is false |
|
||||
| test.cpp:306:6:306:19 | ... != ... | ... != ... == 0 when ... != ... is false |
|
||||
| test.cpp:306:6:306:19 | ... != ... | ... != ... == 0+0 when ... != ... is false |
|
||||
| test.cpp:306:6:306:19 | ... != ... | ... != ... == 1 when ... != ... is true |
|
||||
| test.cpp:312:6:312:18 | ... == ... | 0 != ... < ...+0 when ... == ... is false |
|
||||
| test.cpp:312:6:312:18 | ... == ... | 0 == ... < ...+0 when ... == ... is true |
|
||||
| test.cpp:312:6:312:18 | ... == ... | ... < ... != 0 when ... == ... is false |
|
||||
| test.cpp:312:6:312:18 | ... == ... | ... < ... != 0+0 when ... == ... is false |
|
||||
| test.cpp:312:6:312:18 | ... == ... | ... < ... == 0 when ... == ... is true |
|
||||
| test.cpp:312:6:312:18 | ... == ... | ... < ... == 0+0 when ... == ... is true |
|
||||
| test.cpp:312:6:312:18 | ... == ... | ... == ... != 0 when ... == ... is true |
|
||||
| test.cpp:312:6:312:18 | ... == ... | ... == ... != 1 when ... == ... is false |
|
||||
| test.cpp:312:6:312:18 | ... == ... | ... == ... == 0 when ... == ... is false |
|
||||
| test.cpp:312:6:312:18 | ... == ... | ... == ... == 1 when ... == ... is true |
|
||||
| test.cpp:318:6:318:18 | ... != ... | 0 != ... < ...+0 when ... != ... is true |
|
||||
| test.cpp:318:6:318:18 | ... != ... | 0 == ... < ...+0 when ... != ... is false |
|
||||
| test.cpp:318:6:318:18 | ... != ... | ... != ... != 0 when ... != ... is true |
|
||||
| test.cpp:318:6:318:18 | ... != ... | ... != ... != 1 when ... != ... is false |
|
||||
| test.cpp:318:6:318:18 | ... != ... | ... != ... == 0 when ... != ... is false |
|
||||
| test.cpp:318:6:318:18 | ... != ... | ... != ... == 1 when ... != ... is true |
|
||||
| test.cpp:318:6:318:18 | ... != ... | ... < ... != 0 when ... != ... is true |
|
||||
| test.cpp:318:6:318:18 | ... != ... | ... < ... != 0+0 when ... != ... is true |
|
||||
| test.cpp:318:6:318:18 | ... != ... | ... < ... == 0 when ... != ... is false |
|
||||
| test.cpp:318:6:318:18 | ... != ... | ... < ... == 0+0 when ... != ... is false |
|
||||
|
||||
@@ -103,6 +103,8 @@
|
||||
| test.c:198:8:198:8 | b | false | test.c:198:11:200:3 | { ... } |
|
||||
| test.c:206:7:206:8 | ! ... | true | test.c:206:11:208:3 | { ... } |
|
||||
| test.c:206:8:206:8 | c | false | test.c:206:11:208:3 | { ... } |
|
||||
| test.c:215:6:215:18 | call to __builtin_expect | true | test.c:215:21:217:5 | { ... } |
|
||||
| test.c:219:9:219:22 | call to __builtin_expect | true | test.c:219:25:221:5 | { ... } |
|
||||
| test.cpp:18:8:18:10 | call to get | true | test.cpp:19:5:19:14 | ExprStmt |
|
||||
| test.cpp:31:7:31:13 | ... == ... | false | test.cpp:30:6:30:16 | doSomething |
|
||||
| test.cpp:31:7:31:13 | ... == ... | false | test.cpp:34:1:34:1 | return ... |
|
||||
@@ -168,3 +170,27 @@
|
||||
| test.cpp:241:22:241:30 | ... == ... | true | test.cpp:241:35:241:43 | ms |
|
||||
| test.cpp:241:22:241:30 | ... == ... | true | test.cpp:241:46:242:13 | { ... } |
|
||||
| test.cpp:241:35:241:43 | ... == ... | true | test.cpp:241:46:242:13 | { ... } |
|
||||
| test.cpp:247:6:247:18 | ... == ... | false | test.cpp:249:10:251:3 | { ... } |
|
||||
| test.cpp:247:6:247:18 | ... == ... | true | test.cpp:247:21:249:3 | { ... } |
|
||||
| test.cpp:253:6:253:18 | ... != ... | false | test.cpp:255:10:257:3 | { ... } |
|
||||
| test.cpp:253:6:253:18 | ... != ... | true | test.cpp:253:21:255:3 | { ... } |
|
||||
| test.cpp:260:6:260:18 | ... == ... | false | test.cpp:262:10:264:3 | { ... } |
|
||||
| test.cpp:260:6:260:18 | ... == ... | true | test.cpp:260:21:262:3 | { ... } |
|
||||
| test.cpp:266:6:266:18 | ... != ... | false | test.cpp:268:10:270:3 | { ... } |
|
||||
| test.cpp:266:6:266:18 | ... != ... | true | test.cpp:266:21:268:3 | { ... } |
|
||||
| test.cpp:273:6:273:17 | ... == ... | false | test.cpp:275:10:277:3 | { ... } |
|
||||
| test.cpp:273:6:273:17 | ... == ... | true | test.cpp:273:20:275:3 | { ... } |
|
||||
| test.cpp:279:6:279:17 | ... != ... | false | test.cpp:281:10:283:3 | { ... } |
|
||||
| test.cpp:279:6:279:17 | ... != ... | true | test.cpp:279:20:281:3 | { ... } |
|
||||
| test.cpp:287:6:287:19 | ... == ... | false | test.cpp:289:10:291:3 | { ... } |
|
||||
| test.cpp:287:6:287:19 | ... == ... | true | test.cpp:287:22:289:3 | { ... } |
|
||||
| test.cpp:293:6:293:19 | ... != ... | false | test.cpp:295:10:297:3 | { ... } |
|
||||
| test.cpp:293:6:293:19 | ... != ... | true | test.cpp:293:22:295:3 | { ... } |
|
||||
| test.cpp:300:6:300:19 | ... == ... | false | test.cpp:302:10:304:3 | { ... } |
|
||||
| test.cpp:300:6:300:19 | ... == ... | true | test.cpp:300:22:302:3 | { ... } |
|
||||
| test.cpp:306:6:306:19 | ... != ... | false | test.cpp:308:10:310:3 | { ... } |
|
||||
| test.cpp:306:6:306:19 | ... != ... | true | test.cpp:306:22:308:3 | { ... } |
|
||||
| test.cpp:312:6:312:18 | ... == ... | false | test.cpp:314:10:316:3 | { ... } |
|
||||
| test.cpp:312:6:312:18 | ... == ... | true | test.cpp:312:21:314:3 | { ... } |
|
||||
| test.cpp:318:6:318:18 | ... != ... | false | test.cpp:320:10:322:3 | { ... } |
|
||||
| test.cpp:318:6:318:18 | ... != ... | true | test.cpp:318:21:320:3 | { ... } |
|
||||
|
||||
@@ -311,6 +311,54 @@ binary
|
||||
| test.cpp:241:35:241:43 | ... == ... | test.cpp:241:17:241:17 | 0 | == | test.cpp:241:12:241:12 | i | 0 | test.cpp:241:46:242:13 | { ... } |
|
||||
| test.cpp:241:35:241:43 | ... == ... | test.cpp:241:38:241:38 | i | == | test.cpp:241:43:241:43 | 0 | 0 | test.cpp:241:46:242:13 | { ... } |
|
||||
| test.cpp:241:35:241:43 | ... == ... | test.cpp:241:43:241:43 | 0 | == | test.cpp:241:38:241:38 | i | 0 | test.cpp:241:46:242:13 | { ... } |
|
||||
| test.cpp:247:6:247:18 | ... == ... | test.cpp:247:7:247:12 | ... == ... | != | test.cpp:247:18:247:18 | 0 | 0 | test.cpp:249:10:251:3 | { ... } |
|
||||
| test.cpp:247:6:247:18 | ... == ... | test.cpp:247:7:247:12 | ... == ... | == | test.cpp:247:18:247:18 | 0 | 0 | test.cpp:247:21:249:3 | { ... } |
|
||||
| test.cpp:247:6:247:18 | ... == ... | test.cpp:247:18:247:18 | 0 | != | test.cpp:247:7:247:12 | ... == ... | 0 | test.cpp:249:10:251:3 | { ... } |
|
||||
| test.cpp:247:6:247:18 | ... == ... | test.cpp:247:18:247:18 | 0 | == | test.cpp:247:7:247:12 | ... == ... | 0 | test.cpp:247:21:249:3 | { ... } |
|
||||
| test.cpp:253:6:253:18 | ... != ... | test.cpp:253:7:253:12 | ... == ... | != | test.cpp:253:18:253:18 | 0 | 0 | test.cpp:253:21:255:3 | { ... } |
|
||||
| test.cpp:253:6:253:18 | ... != ... | test.cpp:253:7:253:12 | ... == ... | == | test.cpp:253:18:253:18 | 0 | 0 | test.cpp:255:10:257:3 | { ... } |
|
||||
| test.cpp:253:6:253:18 | ... != ... | test.cpp:253:18:253:18 | 0 | != | test.cpp:253:7:253:12 | ... == ... | 0 | test.cpp:253:21:255:3 | { ... } |
|
||||
| test.cpp:253:6:253:18 | ... != ... | test.cpp:253:18:253:18 | 0 | == | test.cpp:253:7:253:12 | ... == ... | 0 | test.cpp:255:10:257:3 | { ... } |
|
||||
| test.cpp:260:6:260:18 | ... == ... | test.cpp:260:7:260:12 | ... != ... | != | test.cpp:260:18:260:18 | 0 | 0 | test.cpp:262:10:264:3 | { ... } |
|
||||
| test.cpp:260:6:260:18 | ... == ... | test.cpp:260:7:260:12 | ... != ... | == | test.cpp:260:18:260:18 | 0 | 0 | test.cpp:260:21:262:3 | { ... } |
|
||||
| test.cpp:260:6:260:18 | ... == ... | test.cpp:260:18:260:18 | 0 | != | test.cpp:260:7:260:12 | ... != ... | 0 | test.cpp:262:10:264:3 | { ... } |
|
||||
| test.cpp:260:6:260:18 | ... == ... | test.cpp:260:18:260:18 | 0 | == | test.cpp:260:7:260:12 | ... != ... | 0 | test.cpp:260:21:262:3 | { ... } |
|
||||
| test.cpp:266:6:266:18 | ... != ... | test.cpp:266:7:266:12 | ... != ... | != | test.cpp:266:18:266:18 | 0 | 0 | test.cpp:266:21:268:3 | { ... } |
|
||||
| test.cpp:266:6:266:18 | ... != ... | test.cpp:266:7:266:12 | ... != ... | == | test.cpp:266:18:266:18 | 0 | 0 | test.cpp:268:10:270:3 | { ... } |
|
||||
| test.cpp:266:6:266:18 | ... != ... | test.cpp:266:18:266:18 | 0 | != | test.cpp:266:7:266:12 | ... != ... | 0 | test.cpp:266:21:268:3 | { ... } |
|
||||
| test.cpp:266:6:266:18 | ... != ... | test.cpp:266:18:266:18 | 0 | == | test.cpp:266:7:266:12 | ... != ... | 0 | test.cpp:268:10:270:3 | { ... } |
|
||||
| test.cpp:273:6:273:17 | ... == ... | test.cpp:273:7:273:11 | ... < ... | != | test.cpp:273:17:273:17 | 0 | 0 | test.cpp:275:10:277:3 | { ... } |
|
||||
| test.cpp:273:6:273:17 | ... == ... | test.cpp:273:7:273:11 | ... < ... | == | test.cpp:273:17:273:17 | 0 | 0 | test.cpp:273:20:275:3 | { ... } |
|
||||
| test.cpp:273:6:273:17 | ... == ... | test.cpp:273:17:273:17 | 0 | != | test.cpp:273:7:273:11 | ... < ... | 0 | test.cpp:275:10:277:3 | { ... } |
|
||||
| test.cpp:273:6:273:17 | ... == ... | test.cpp:273:17:273:17 | 0 | == | test.cpp:273:7:273:11 | ... < ... | 0 | test.cpp:273:20:275:3 | { ... } |
|
||||
| test.cpp:279:6:279:17 | ... != ... | test.cpp:279:7:279:11 | ... < ... | != | test.cpp:279:17:279:17 | 0 | 0 | test.cpp:279:20:281:3 | { ... } |
|
||||
| test.cpp:279:6:279:17 | ... != ... | test.cpp:279:7:279:11 | ... < ... | == | test.cpp:279:17:279:17 | 0 | 0 | test.cpp:281:10:283:3 | { ... } |
|
||||
| test.cpp:279:6:279:17 | ... != ... | test.cpp:279:17:279:17 | 0 | != | test.cpp:279:7:279:11 | ... < ... | 0 | test.cpp:279:20:281:3 | { ... } |
|
||||
| test.cpp:279:6:279:17 | ... != ... | test.cpp:279:17:279:17 | 0 | == | test.cpp:279:7:279:11 | ... < ... | 0 | test.cpp:281:10:283:3 | { ... } |
|
||||
| test.cpp:287:6:287:19 | ... == ... | test.cpp:287:7:287:13 | ... == ... | != | test.cpp:287:19:287:19 | 0 | 0 | test.cpp:289:10:291:3 | { ... } |
|
||||
| test.cpp:287:6:287:19 | ... == ... | test.cpp:287:7:287:13 | ... == ... | == | test.cpp:287:19:287:19 | 0 | 0 | test.cpp:287:22:289:3 | { ... } |
|
||||
| test.cpp:287:6:287:19 | ... == ... | test.cpp:287:19:287:19 | 0 | != | test.cpp:287:7:287:13 | ... == ... | 0 | test.cpp:289:10:291:3 | { ... } |
|
||||
| test.cpp:287:6:287:19 | ... == ... | test.cpp:287:19:287:19 | 0 | == | test.cpp:287:7:287:13 | ... == ... | 0 | test.cpp:287:22:289:3 | { ... } |
|
||||
| test.cpp:293:6:293:19 | ... != ... | test.cpp:293:7:293:13 | ... == ... | != | test.cpp:293:19:293:19 | 0 | 0 | test.cpp:293:22:295:3 | { ... } |
|
||||
| test.cpp:293:6:293:19 | ... != ... | test.cpp:293:7:293:13 | ... == ... | == | test.cpp:293:19:293:19 | 0 | 0 | test.cpp:295:10:297:3 | { ... } |
|
||||
| test.cpp:293:6:293:19 | ... != ... | test.cpp:293:19:293:19 | 0 | != | test.cpp:293:7:293:13 | ... == ... | 0 | test.cpp:293:22:295:3 | { ... } |
|
||||
| test.cpp:293:6:293:19 | ... != ... | test.cpp:293:19:293:19 | 0 | == | test.cpp:293:7:293:13 | ... == ... | 0 | test.cpp:295:10:297:3 | { ... } |
|
||||
| test.cpp:300:6:300:19 | ... == ... | test.cpp:300:7:300:13 | ... != ... | != | test.cpp:300:19:300:19 | 0 | 0 | test.cpp:302:10:304:3 | { ... } |
|
||||
| test.cpp:300:6:300:19 | ... == ... | test.cpp:300:7:300:13 | ... != ... | == | test.cpp:300:19:300:19 | 0 | 0 | test.cpp:300:22:302:3 | { ... } |
|
||||
| test.cpp:300:6:300:19 | ... == ... | test.cpp:300:19:300:19 | 0 | != | test.cpp:300:7:300:13 | ... != ... | 0 | test.cpp:302:10:304:3 | { ... } |
|
||||
| test.cpp:300:6:300:19 | ... == ... | test.cpp:300:19:300:19 | 0 | == | test.cpp:300:7:300:13 | ... != ... | 0 | test.cpp:300:22:302:3 | { ... } |
|
||||
| test.cpp:306:6:306:19 | ... != ... | test.cpp:306:7:306:13 | ... != ... | != | test.cpp:306:19:306:19 | 0 | 0 | test.cpp:306:22:308:3 | { ... } |
|
||||
| test.cpp:306:6:306:19 | ... != ... | test.cpp:306:7:306:13 | ... != ... | == | test.cpp:306:19:306:19 | 0 | 0 | test.cpp:308:10:310:3 | { ... } |
|
||||
| test.cpp:306:6:306:19 | ... != ... | test.cpp:306:19:306:19 | 0 | != | test.cpp:306:7:306:13 | ... != ... | 0 | test.cpp:306:22:308:3 | { ... } |
|
||||
| test.cpp:306:6:306:19 | ... != ... | test.cpp:306:19:306:19 | 0 | == | test.cpp:306:7:306:13 | ... != ... | 0 | test.cpp:308:10:310:3 | { ... } |
|
||||
| test.cpp:312:6:312:18 | ... == ... | test.cpp:312:7:312:12 | ... < ... | != | test.cpp:312:18:312:18 | 0 | 0 | test.cpp:314:10:316:3 | { ... } |
|
||||
| test.cpp:312:6:312:18 | ... == ... | test.cpp:312:7:312:12 | ... < ... | == | test.cpp:312:18:312:18 | 0 | 0 | test.cpp:312:21:314:3 | { ... } |
|
||||
| test.cpp:312:6:312:18 | ... == ... | test.cpp:312:18:312:18 | 0 | != | test.cpp:312:7:312:12 | ... < ... | 0 | test.cpp:314:10:316:3 | { ... } |
|
||||
| test.cpp:312:6:312:18 | ... == ... | test.cpp:312:18:312:18 | 0 | == | test.cpp:312:7:312:12 | ... < ... | 0 | test.cpp:312:21:314:3 | { ... } |
|
||||
| test.cpp:318:6:318:18 | ... != ... | test.cpp:318:7:318:12 | ... < ... | != | test.cpp:318:18:318:18 | 0 | 0 | test.cpp:318:21:320:3 | { ... } |
|
||||
| test.cpp:318:6:318:18 | ... != ... | test.cpp:318:7:318:12 | ... < ... | == | test.cpp:318:18:318:18 | 0 | 0 | test.cpp:320:10:322:3 | { ... } |
|
||||
| test.cpp:318:6:318:18 | ... != ... | test.cpp:318:18:318:18 | 0 | != | test.cpp:318:7:318:12 | ... < ... | 0 | test.cpp:318:21:320:3 | { ... } |
|
||||
| test.cpp:318:6:318:18 | ... != ... | test.cpp:318:18:318:18 | 0 | == | test.cpp:318:7:318:12 | ... < ... | 0 | test.cpp:320:10:322:3 | { ... } |
|
||||
unary
|
||||
| test.c:7:9:7:13 | ... > ... | test.c:7:9:7:9 | x | < | 1 | test.c:10:12:11:14 | { ... } |
|
||||
| test.c:7:9:7:13 | ... > ... | test.c:7:9:7:9 | x | >= | 1 | test.c:7:16:9:14 | { ... } |
|
||||
@@ -646,6 +694,10 @@ unary
|
||||
| test.c:206:8:206:8 | c | test.c:206:7:206:8 | ! ... | != | 0 | test.c:206:11:208:3 | { ... } |
|
||||
| test.c:206:8:206:8 | c | test.c:206:7:206:8 | ! ... | == | 1 | test.c:206:11:208:3 | { ... } |
|
||||
| test.c:206:8:206:8 | c | test.c:206:8:206:8 | c | == | 0 | test.c:206:11:208:3 | { ... } |
|
||||
| test.c:215:6:215:18 | call to __builtin_expect | test.c:215:6:215:18 | call to __builtin_expect | != | 0 | test.c:215:21:217:5 | { ... } |
|
||||
| test.c:215:6:215:18 | call to __builtin_expect | test.c:215:6:215:18 | call to __builtin_expect | == | 1 | test.c:215:21:217:5 | { ... } |
|
||||
| test.c:219:9:219:22 | call to __builtin_expect | test.c:219:9:219:22 | call to __builtin_expect | != | 0 | test.c:219:25:221:5 | { ... } |
|
||||
| test.c:219:9:219:22 | call to __builtin_expect | test.c:219:9:219:22 | call to __builtin_expect | == | 1 | test.c:219:25:221:5 | { ... } |
|
||||
| test.cpp:18:8:18:10 | call to get | test.cpp:18:8:18:10 | call to get | != | 0 | test.cpp:19:5:19:14 | ExprStmt |
|
||||
| test.cpp:18:8:18:10 | call to get | test.cpp:18:8:18:10 | call to get | == | 1 | test.cpp:19:5:19:14 | ExprStmt |
|
||||
| test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:7 | x | != | -1 | test.cpp:30:6:30:16 | doSomething |
|
||||
@@ -955,3 +1007,75 @@ unary
|
||||
| test.cpp:241:35:241:43 | ... == ... | test.cpp:241:35:241:43 | ... == ... | != | 0 | test.cpp:241:46:242:13 | { ... } |
|
||||
| test.cpp:241:35:241:43 | ... == ... | test.cpp:241:35:241:43 | ... == ... | == | 1 | test.cpp:241:46:242:13 | { ... } |
|
||||
| test.cpp:241:35:241:43 | ... == ... | test.cpp:241:38:241:38 | i | == | 0 | test.cpp:241:46:242:13 | { ... } |
|
||||
| test.cpp:247:6:247:18 | ... == ... | test.cpp:247:6:247:18 | ... == ... | != | 0 | test.cpp:247:21:249:3 | { ... } |
|
||||
| test.cpp:247:6:247:18 | ... == ... | test.cpp:247:6:247:18 | ... == ... | != | 1 | test.cpp:249:10:251:3 | { ... } |
|
||||
| test.cpp:247:6:247:18 | ... == ... | test.cpp:247:6:247:18 | ... == ... | == | 0 | test.cpp:249:10:251:3 | { ... } |
|
||||
| test.cpp:247:6:247:18 | ... == ... | test.cpp:247:6:247:18 | ... == ... | == | 1 | test.cpp:247:21:249:3 | { ... } |
|
||||
| test.cpp:247:6:247:18 | ... == ... | test.cpp:247:7:247:12 | ... == ... | != | 0 | test.cpp:249:10:251:3 | { ... } |
|
||||
| test.cpp:247:6:247:18 | ... == ... | test.cpp:247:7:247:12 | ... == ... | == | 0 | test.cpp:247:21:249:3 | { ... } |
|
||||
| test.cpp:253:6:253:18 | ... != ... | test.cpp:253:6:253:18 | ... != ... | != | 0 | test.cpp:253:21:255:3 | { ... } |
|
||||
| test.cpp:253:6:253:18 | ... != ... | test.cpp:253:6:253:18 | ... != ... | != | 1 | test.cpp:255:10:257:3 | { ... } |
|
||||
| test.cpp:253:6:253:18 | ... != ... | test.cpp:253:6:253:18 | ... != ... | == | 0 | test.cpp:255:10:257:3 | { ... } |
|
||||
| test.cpp:253:6:253:18 | ... != ... | test.cpp:253:6:253:18 | ... != ... | == | 1 | test.cpp:253:21:255:3 | { ... } |
|
||||
| test.cpp:253:6:253:18 | ... != ... | test.cpp:253:7:253:12 | ... == ... | != | 0 | test.cpp:253:21:255:3 | { ... } |
|
||||
| test.cpp:253:6:253:18 | ... != ... | test.cpp:253:7:253:12 | ... == ... | == | 0 | test.cpp:255:10:257:3 | { ... } |
|
||||
| test.cpp:260:6:260:18 | ... == ... | test.cpp:260:6:260:18 | ... == ... | != | 0 | test.cpp:260:21:262:3 | { ... } |
|
||||
| test.cpp:260:6:260:18 | ... == ... | test.cpp:260:6:260:18 | ... == ... | != | 1 | test.cpp:262:10:264:3 | { ... } |
|
||||
| test.cpp:260:6:260:18 | ... == ... | test.cpp:260:6:260:18 | ... == ... | == | 0 | test.cpp:262:10:264:3 | { ... } |
|
||||
| test.cpp:260:6:260:18 | ... == ... | test.cpp:260:6:260:18 | ... == ... | == | 1 | test.cpp:260:21:262:3 | { ... } |
|
||||
| test.cpp:260:6:260:18 | ... == ... | test.cpp:260:7:260:12 | ... != ... | != | 0 | test.cpp:262:10:264:3 | { ... } |
|
||||
| test.cpp:260:6:260:18 | ... == ... | test.cpp:260:7:260:12 | ... != ... | == | 0 | test.cpp:260:21:262:3 | { ... } |
|
||||
| test.cpp:266:6:266:18 | ... != ... | test.cpp:266:6:266:18 | ... != ... | != | 0 | test.cpp:266:21:268:3 | { ... } |
|
||||
| test.cpp:266:6:266:18 | ... != ... | test.cpp:266:6:266:18 | ... != ... | != | 1 | test.cpp:268:10:270:3 | { ... } |
|
||||
| test.cpp:266:6:266:18 | ... != ... | test.cpp:266:6:266:18 | ... != ... | == | 0 | test.cpp:268:10:270:3 | { ... } |
|
||||
| test.cpp:266:6:266:18 | ... != ... | test.cpp:266:6:266:18 | ... != ... | == | 1 | test.cpp:266:21:268:3 | { ... } |
|
||||
| test.cpp:266:6:266:18 | ... != ... | test.cpp:266:7:266:12 | ... != ... | != | 0 | test.cpp:266:21:268:3 | { ... } |
|
||||
| test.cpp:266:6:266:18 | ... != ... | test.cpp:266:7:266:12 | ... != ... | == | 0 | test.cpp:268:10:270:3 | { ... } |
|
||||
| test.cpp:273:6:273:17 | ... == ... | test.cpp:273:6:273:17 | ... == ... | != | 0 | test.cpp:273:20:275:3 | { ... } |
|
||||
| test.cpp:273:6:273:17 | ... == ... | test.cpp:273:6:273:17 | ... == ... | != | 1 | test.cpp:275:10:277:3 | { ... } |
|
||||
| test.cpp:273:6:273:17 | ... == ... | test.cpp:273:6:273:17 | ... == ... | == | 0 | test.cpp:275:10:277:3 | { ... } |
|
||||
| test.cpp:273:6:273:17 | ... == ... | test.cpp:273:6:273:17 | ... == ... | == | 1 | test.cpp:273:20:275:3 | { ... } |
|
||||
| test.cpp:273:6:273:17 | ... == ... | test.cpp:273:7:273:11 | ... < ... | != | 0 | test.cpp:275:10:277:3 | { ... } |
|
||||
| test.cpp:273:6:273:17 | ... == ... | test.cpp:273:7:273:11 | ... < ... | == | 0 | test.cpp:273:20:275:3 | { ... } |
|
||||
| test.cpp:279:6:279:17 | ... != ... | test.cpp:279:6:279:17 | ... != ... | != | 0 | test.cpp:279:20:281:3 | { ... } |
|
||||
| test.cpp:279:6:279:17 | ... != ... | test.cpp:279:6:279:17 | ... != ... | != | 1 | test.cpp:281:10:283:3 | { ... } |
|
||||
| test.cpp:279:6:279:17 | ... != ... | test.cpp:279:6:279:17 | ... != ... | == | 0 | test.cpp:281:10:283:3 | { ... } |
|
||||
| test.cpp:279:6:279:17 | ... != ... | test.cpp:279:6:279:17 | ... != ... | == | 1 | test.cpp:279:20:281:3 | { ... } |
|
||||
| test.cpp:279:6:279:17 | ... != ... | test.cpp:279:7:279:11 | ... < ... | != | 0 | test.cpp:279:20:281:3 | { ... } |
|
||||
| test.cpp:279:6:279:17 | ... != ... | test.cpp:279:7:279:11 | ... < ... | == | 0 | test.cpp:281:10:283:3 | { ... } |
|
||||
| test.cpp:287:6:287:19 | ... == ... | test.cpp:287:6:287:19 | ... == ... | != | 0 | test.cpp:287:22:289:3 | { ... } |
|
||||
| test.cpp:287:6:287:19 | ... == ... | test.cpp:287:6:287:19 | ... == ... | != | 1 | test.cpp:289:10:291:3 | { ... } |
|
||||
| test.cpp:287:6:287:19 | ... == ... | test.cpp:287:6:287:19 | ... == ... | == | 0 | test.cpp:289:10:291:3 | { ... } |
|
||||
| test.cpp:287:6:287:19 | ... == ... | test.cpp:287:6:287:19 | ... == ... | == | 1 | test.cpp:287:22:289:3 | { ... } |
|
||||
| test.cpp:287:6:287:19 | ... == ... | test.cpp:287:7:287:13 | ... == ... | != | 0 | test.cpp:289:10:291:3 | { ... } |
|
||||
| test.cpp:287:6:287:19 | ... == ... | test.cpp:287:7:287:13 | ... == ... | == | 0 | test.cpp:287:22:289:3 | { ... } |
|
||||
| test.cpp:293:6:293:19 | ... != ... | test.cpp:293:6:293:19 | ... != ... | != | 0 | test.cpp:293:22:295:3 | { ... } |
|
||||
| test.cpp:293:6:293:19 | ... != ... | test.cpp:293:6:293:19 | ... != ... | != | 1 | test.cpp:295:10:297:3 | { ... } |
|
||||
| test.cpp:293:6:293:19 | ... != ... | test.cpp:293:6:293:19 | ... != ... | == | 0 | test.cpp:295:10:297:3 | { ... } |
|
||||
| test.cpp:293:6:293:19 | ... != ... | test.cpp:293:6:293:19 | ... != ... | == | 1 | test.cpp:293:22:295:3 | { ... } |
|
||||
| test.cpp:293:6:293:19 | ... != ... | test.cpp:293:7:293:13 | ... == ... | != | 0 | test.cpp:293:22:295:3 | { ... } |
|
||||
| test.cpp:293:6:293:19 | ... != ... | test.cpp:293:7:293:13 | ... == ... | == | 0 | test.cpp:295:10:297:3 | { ... } |
|
||||
| test.cpp:300:6:300:19 | ... == ... | test.cpp:300:6:300:19 | ... == ... | != | 0 | test.cpp:300:22:302:3 | { ... } |
|
||||
| test.cpp:300:6:300:19 | ... == ... | test.cpp:300:6:300:19 | ... == ... | != | 1 | test.cpp:302:10:304:3 | { ... } |
|
||||
| test.cpp:300:6:300:19 | ... == ... | test.cpp:300:6:300:19 | ... == ... | == | 0 | test.cpp:302:10:304:3 | { ... } |
|
||||
| test.cpp:300:6:300:19 | ... == ... | test.cpp:300:6:300:19 | ... == ... | == | 1 | test.cpp:300:22:302:3 | { ... } |
|
||||
| test.cpp:300:6:300:19 | ... == ... | test.cpp:300:7:300:13 | ... != ... | != | 0 | test.cpp:302:10:304:3 | { ... } |
|
||||
| test.cpp:300:6:300:19 | ... == ... | test.cpp:300:7:300:13 | ... != ... | == | 0 | test.cpp:300:22:302:3 | { ... } |
|
||||
| test.cpp:306:6:306:19 | ... != ... | test.cpp:306:6:306:19 | ... != ... | != | 0 | test.cpp:306:22:308:3 | { ... } |
|
||||
| test.cpp:306:6:306:19 | ... != ... | test.cpp:306:6:306:19 | ... != ... | != | 1 | test.cpp:308:10:310:3 | { ... } |
|
||||
| test.cpp:306:6:306:19 | ... != ... | test.cpp:306:6:306:19 | ... != ... | == | 0 | test.cpp:308:10:310:3 | { ... } |
|
||||
| test.cpp:306:6:306:19 | ... != ... | test.cpp:306:6:306:19 | ... != ... | == | 1 | test.cpp:306:22:308:3 | { ... } |
|
||||
| test.cpp:306:6:306:19 | ... != ... | test.cpp:306:7:306:13 | ... != ... | != | 0 | test.cpp:306:22:308:3 | { ... } |
|
||||
| test.cpp:306:6:306:19 | ... != ... | test.cpp:306:7:306:13 | ... != ... | == | 0 | test.cpp:308:10:310:3 | { ... } |
|
||||
| test.cpp:312:6:312:18 | ... == ... | test.cpp:312:6:312:18 | ... == ... | != | 0 | test.cpp:312:21:314:3 | { ... } |
|
||||
| test.cpp:312:6:312:18 | ... == ... | test.cpp:312:6:312:18 | ... == ... | != | 1 | test.cpp:314:10:316:3 | { ... } |
|
||||
| test.cpp:312:6:312:18 | ... == ... | test.cpp:312:6:312:18 | ... == ... | == | 0 | test.cpp:314:10:316:3 | { ... } |
|
||||
| test.cpp:312:6:312:18 | ... == ... | test.cpp:312:6:312:18 | ... == ... | == | 1 | test.cpp:312:21:314:3 | { ... } |
|
||||
| test.cpp:312:6:312:18 | ... == ... | test.cpp:312:7:312:12 | ... < ... | != | 0 | test.cpp:314:10:316:3 | { ... } |
|
||||
| test.cpp:312:6:312:18 | ... == ... | test.cpp:312:7:312:12 | ... < ... | == | 0 | test.cpp:312:21:314:3 | { ... } |
|
||||
| test.cpp:318:6:318:18 | ... != ... | test.cpp:318:6:318:18 | ... != ... | != | 0 | test.cpp:318:21:320:3 | { ... } |
|
||||
| test.cpp:318:6:318:18 | ... != ... | test.cpp:318:6:318:18 | ... != ... | != | 1 | test.cpp:320:10:322:3 | { ... } |
|
||||
| test.cpp:318:6:318:18 | ... != ... | test.cpp:318:6:318:18 | ... != ... | == | 0 | test.cpp:320:10:322:3 | { ... } |
|
||||
| test.cpp:318:6:318:18 | ... != ... | test.cpp:318:6:318:18 | ... != ... | == | 1 | test.cpp:318:21:320:3 | { ... } |
|
||||
| test.cpp:318:6:318:18 | ... != ... | test.cpp:318:7:318:12 | ... < ... | != | 0 | test.cpp:318:21:320:3 | { ... } |
|
||||
| test.cpp:318:6:318:18 | ... != ... | test.cpp:318:7:318:12 | ... < ... | == | 0 | test.cpp:320:10:322:3 | { ... } |
|
||||
|
||||
@@ -206,4 +206,17 @@ void test14(int a, int b) {
|
||||
if (!c) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# define likely(x) __builtin_expect(!!(x), 1)
|
||||
|
||||
void test15(int a, int b)
|
||||
{
|
||||
if (likely(a > b)) {
|
||||
|
||||
}
|
||||
|
||||
if (likely(a > 42)) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,3 +242,82 @@ int test_types(signed char sc, unsigned long ul, float f, double d, bool b, Myst
|
||||
ctr++;
|
||||
}
|
||||
}
|
||||
|
||||
void test_cmp_implies(int a, int b) {
|
||||
if((a == b) == 0) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if((a == b) != 0) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
|
||||
if((a != b) == 0) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if((a != b) != 0) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
|
||||
if((a < b) == 0) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if((a < b) != 0) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void test_cmp_implies_unary(int a) {
|
||||
if((a == 42) == 0) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if((a == 42) != 0) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
|
||||
if((a != 42) == 0) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if((a != 42) != 0) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if((a < 42) == 0) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if((a < 42) != 0) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
edges
|
||||
| test.c:10:31:10:32 | sscanf output argument | test.c:11:7:11:7 | x | provenance | |
|
||||
| test.cpp:34:15:34:16 | scanf output argument | test.cpp:35:7:35:7 | i | provenance | |
|
||||
| test.cpp:41:19:41:20 | scanf output argument | test.cpp:43:8:43:8 | i | provenance | |
|
||||
| test.cpp:58:19:58:20 | scanf output argument | test.cpp:60:8:60:8 | i | provenance | |
|
||||
@@ -56,6 +57,8 @@ edges
|
||||
| test.cpp:567:35:567:36 | scanf output argument | test.cpp:569:9:569:9 | i | provenance | |
|
||||
| test.cpp:575:30:575:31 | scanf output argument | test.cpp:577:9:577:9 | i | provenance | |
|
||||
nodes
|
||||
| test.c:10:31:10:32 | sscanf output argument | semmle.label | sscanf output argument |
|
||||
| test.c:11:7:11:7 | x | semmle.label | x |
|
||||
| test.cpp:34:15:34:16 | scanf output argument | semmle.label | scanf output argument |
|
||||
| test.cpp:35:7:35:7 | i | semmle.label | i |
|
||||
| test.cpp:41:19:41:20 | scanf output argument | semmle.label | scanf output argument |
|
||||
@@ -165,6 +168,7 @@ nodes
|
||||
| test.cpp:577:9:577:9 | i | semmle.label | i |
|
||||
subpaths
|
||||
#select
|
||||
| test.c:11:7:11:7 | x | test.c:10:31:10:32 | sscanf output argument | test.c:11:7:11:7 | x | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.c:10:13:10:18 | call to sscanf | call to sscanf |
|
||||
| test.cpp:35:7:35:7 | i | test.cpp:34:15:34:16 | scanf output argument | test.cpp:35:7:35:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:34:3:34:7 | call to scanf | call to scanf |
|
||||
| test.cpp:68:7:68:7 | i | test.cpp:67:15:67:16 | scanf output argument | test.cpp:68:7:68:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:67:3:67:7 | call to scanf | call to scanf |
|
||||
| test.cpp:80:7:80:7 | i | test.cpp:79:15:79:16 | scanf output argument | test.cpp:80:7:80:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:79:3:79:7 | call to scanf | call to scanf |
|
||||
|
||||
13
cpp/ql/test/query-tests/Critical/MissingCheckScanf/test.c
Normal file
13
cpp/ql/test/query-tests/Critical/MissingCheckScanf/test.c
Normal file
@@ -0,0 +1,13 @@
|
||||
# define likely(x) __builtin_expect(!!(x), 1)
|
||||
int sscanf(const char *s, const char *format, ...);
|
||||
|
||||
void use(int i);
|
||||
|
||||
void test_likely(const char* s, const char* format)
|
||||
{
|
||||
int x;
|
||||
|
||||
if (likely(sscanf(s, format, &x) == 1)) {
|
||||
use(x); // GOOD [FALSE POSITIVE]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user