mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
In its present form, `getAnUndefinedReturn` does not handle `finally`
blocks correctly. For example, in this snippet
```
try {
return 42;
} finally {
cleanup();
}
```
the call to `cleanup` is erroneously considered an undefined return.
We currently don't use the predicate anywhere, so it seems best to back
it out for the time being.
171 lines
9.6 KiB
Plaintext
171 lines
9.6 KiB
Plaintext
test_getVariable
|
|
| defaultargs.js:1:1:1:24 | functio ... +19) {} |
|
|
| generators.js:1:1:4:1 | functio ... i++;\\n} |
|
|
| generators.js:6:2:6:19 | function* bar() {} |
|
|
| restparms.js:1:1:2:1 | functio ... ys) {\\n} |
|
|
| tst.js:1:1:1:15 | function A() {} |
|
|
| tst.js:2:1:2:16 | function B(x) {} |
|
|
| tst.js:3:1:3:19 | function C(x, y) {} |
|
|
| tst.js:7:9:7:23 | function h() {} |
|
|
| tst.js:9:1:9:24 | functio ... nts) {} |
|
|
| tst.js:10:1:10:31 | functio ... ents; } |
|
|
| tst.js:11:1:11:35 | functio ... ts; } } |
|
|
| tst.js:12:1:12:44 | functio ... s) {} } |
|
|
| tst.js:14:1:14:37 | functio ... s[0]; } |
|
|
test_getScope
|
|
| arrowfns.js:1:24:1:36 | s => s.length |
|
|
| arrowfns.js:2:13:2:23 | () => ++cnt |
|
|
| arrowfns.js:3:12:3:41 | () => { ... "); ; } |
|
|
| defaultargs.js:1:1:1:24 | functio ... +19) {} |
|
|
| exprclosures.js:1:7:1:21 | function(x) x+1 |
|
|
| generators.js:1:1:4:1 | functio ... i++;\\n} |
|
|
| generators.js:6:2:6:19 | function* bar() {} |
|
|
| restparms.js:1:1:2:1 | functio ... ys) {\\n} |
|
|
| tst.js:1:1:1:15 | function A() {} |
|
|
| tst.js:2:1:2:16 | function B(x) {} |
|
|
| tst.js:3:1:3:19 | function C(x, y) {} |
|
|
| tst.js:4:9:4:21 | function() {} |
|
|
| tst.js:5:2:5:15 | function(x) {} |
|
|
| tst.js:6:2:6:18 | function(x, y) {} |
|
|
| tst.js:7:9:7:23 | function h() {} |
|
|
| tst.js:9:1:9:24 | functio ... nts) {} |
|
|
| tst.js:10:1:10:31 | functio ... ents; } |
|
|
| tst.js:11:1:11:35 | functio ... ts; } } |
|
|
| tst.js:12:1:12:44 | functio ... s) {} } |
|
|
| tst.js:14:1:14:37 | functio ... s[0]; } |
|
|
test_getParameter
|
|
| arrowfns.js:1:24:1:36 | s => s.length | 0 | arrowfns.js:1:24:1:24 | s |
|
|
| defaultargs.js:1:1:1:24 | functio ... +19) {} | 0 | defaultargs.js:1:12:1:12 | x |
|
|
| defaultargs.js:1:1:1:24 | functio ... +19) {} | 1 | defaultargs.js:1:15:1:15 | y |
|
|
| exprclosures.js:1:7:1:21 | function(x) x+1 | 0 | exprclosures.js:1:16:1:16 | x |
|
|
| restparms.js:1:1:2:1 | functio ... ys) {\\n} | 0 | restparms.js:1:12:1:12 | x |
|
|
| restparms.js:1:1:2:1 | functio ... ys) {\\n} | 1 | restparms.js:1:18:1:19 | ys |
|
|
| tst.js:2:1:2:16 | function B(x) {} | 0 | tst.js:2:12:2:12 | x |
|
|
| tst.js:3:1:3:19 | function C(x, y) {} | 0 | tst.js:3:12:3:12 | x |
|
|
| tst.js:3:1:3:19 | function C(x, y) {} | 1 | tst.js:3:15:3:15 | y |
|
|
| tst.js:5:2:5:15 | function(x) {} | 0 | tst.js:5:11:5:11 | x |
|
|
| tst.js:6:2:6:18 | function(x, y) {} | 0 | tst.js:6:11:6:11 | x |
|
|
| tst.js:6:2:6:18 | function(x, y) {} | 1 | tst.js:6:14:6:14 | y |
|
|
| tst.js:9:1:9:24 | functio ... nts) {} | 0 | tst.js:9:12:9:20 | arguments |
|
|
test_ReturnedExpression
|
|
| arrowfns.js:1:24:1:36 | s => s.length | arrowfns.js:1:29:1:36 | s.length |
|
|
| arrowfns.js:2:13:2:23 | () => ++cnt | arrowfns.js:2:19:2:23 | ++cnt |
|
|
| exprclosures.js:1:7:1:21 | function(x) x+1 | exprclosures.js:1:19:1:21 | x+1 |
|
|
| tst.js:14:1:14:37 | functio ... s[0]; } | tst.js:14:23:14:34 | arguments[0] |
|
|
test_getDefaultArguments
|
|
| defaultargs.js:1:15:1:15 | y | defaultargs.js:1:17:1:20 | x+19 |
|
|
test_Function
|
|
| arrowfns.js:1:24:1:36 | s => s.length |
|
|
| arrowfns.js:2:13:2:23 | () => ++cnt |
|
|
| arrowfns.js:3:12:3:41 | () => { ... "); ; } |
|
|
| defaultargs.js:1:1:1:24 | functio ... +19) {} |
|
|
| exprclosures.js:1:7:1:21 | function(x) x+1 |
|
|
| generators.js:1:1:4:1 | functio ... i++;\\n} |
|
|
| generators.js:6:2:6:19 | function* bar() {} |
|
|
| restparms.js:1:1:2:1 | functio ... ys) {\\n} |
|
|
| tst.js:1:1:1:15 | function A() {} |
|
|
| tst.js:2:1:2:16 | function B(x) {} |
|
|
| tst.js:3:1:3:19 | function C(x, y) {} |
|
|
| tst.js:4:9:4:21 | function() {} |
|
|
| tst.js:5:2:5:15 | function(x) {} |
|
|
| tst.js:6:2:6:18 | function(x, y) {} |
|
|
| tst.js:7:9:7:23 | function h() {} |
|
|
| tst.js:9:1:9:24 | functio ... nts) {} |
|
|
| tst.js:10:1:10:31 | functio ... ents; } |
|
|
| tst.js:11:1:11:35 | functio ... ts; } } |
|
|
| tst.js:12:1:12:44 | functio ... s) {} } |
|
|
| tst.js:14:1:14:37 | functio ... s[0]; } |
|
|
test_getBody
|
|
| arrowfns.js:1:24:1:36 | s => s.length | arrowfns.js:1:29:1:36 | s.length |
|
|
| arrowfns.js:2:13:2:23 | () => ++cnt | arrowfns.js:2:19:2:23 | ++cnt |
|
|
| arrowfns.js:3:12:3:41 | () => { ... "); ; } | arrowfns.js:3:18:3:41 | { alert ... "); ; } |
|
|
| defaultargs.js:1:1:1:24 | functio ... +19) {} | defaultargs.js:1:23:1:24 | {} |
|
|
| exprclosures.js:1:7:1:21 | function(x) x+1 | exprclosures.js:1:19:1:21 | x+1 |
|
|
| generators.js:1:1:4:1 | functio ... i++;\\n} | generators.js:1:16:4:1 | {\\n for ... i++;\\n} |
|
|
| generators.js:6:2:6:19 | function* bar() {} | generators.js:6:18:6:19 | {} |
|
|
| restparms.js:1:1:2:1 | functio ... ys) {\\n} | restparms.js:1:22:2:1 | {\\n} |
|
|
| tst.js:1:1:1:15 | function A() {} | tst.js:1:14:1:15 | {} |
|
|
| tst.js:2:1:2:16 | function B(x) {} | tst.js:2:15:2:16 | {} |
|
|
| tst.js:3:1:3:19 | function C(x, y) {} | tst.js:3:18:3:19 | {} |
|
|
| tst.js:4:9:4:21 | function() {} | tst.js:4:20:4:21 | {} |
|
|
| tst.js:5:2:5:15 | function(x) {} | tst.js:5:14:5:15 | {} |
|
|
| tst.js:6:2:6:18 | function(x, y) {} | tst.js:6:17:6:18 | {} |
|
|
| tst.js:7:9:7:23 | function h() {} | tst.js:7:22:7:23 | {} |
|
|
| tst.js:9:1:9:24 | functio ... nts) {} | tst.js:9:23:9:24 | {} |
|
|
| tst.js:10:1:10:31 | functio ... ents; } | tst.js:10:14:10:31 | { var arguments; } |
|
|
| tst.js:11:1:11:35 | functio ... ts; } } | tst.js:11:14:11:35 | { { var ... ts; } } |
|
|
| tst.js:12:1:12:44 | functio ... s) {} } | tst.js:12:14:12:44 | { try { ... s) {} } |
|
|
| tst.js:14:1:14:37 | functio ... s[0]; } | tst.js:14:14:14:37 | { retur ... s[0]; } |
|
|
test_getId
|
|
| defaultargs.js:1:1:1:24 | functio ... +19) {} | defaultargs.js:1:10:1:10 | f | f |
|
|
| generators.js:1:1:4:1 | functio ... i++;\\n} | generators.js:1:11:1:13 | foo | foo |
|
|
| generators.js:6:2:6:19 | function* bar() {} | generators.js:6:12:6:14 | bar | bar |
|
|
| restparms.js:1:1:2:1 | functio ... ys) {\\n} | restparms.js:1:10:1:10 | r | r |
|
|
| tst.js:1:1:1:15 | function A() {} | tst.js:1:10:1:10 | A | A |
|
|
| tst.js:2:1:2:16 | function B(x) {} | tst.js:2:10:2:10 | B | B |
|
|
| tst.js:3:1:3:19 | function C(x, y) {} | tst.js:3:10:3:10 | C | C |
|
|
| tst.js:7:9:7:23 | function h() {} | tst.js:7:18:7:18 | h | h |
|
|
| tst.js:9:1:9:24 | functio ... nts) {} | tst.js:9:10:9:10 | k | k |
|
|
| tst.js:10:1:10:31 | functio ... ents; } | tst.js:10:10:10:10 | l | l |
|
|
| tst.js:11:1:11:35 | functio ... ts; } } | tst.js:11:10:11:10 | m | m |
|
|
| tst.js:12:1:12:44 | functio ... s) {} } | tst.js:12:10:12:10 | n | n |
|
|
| tst.js:14:1:14:37 | functio ... s[0]; } | tst.js:14:10:14:10 | p | p |
|
|
test_hasRestParameter
|
|
| restparms.js:1:1:2:1 | functio ... ys) {\\n} |
|
|
test_getArgumentsVariable
|
|
| defaultargs.js:1:1:1:24 | functio ... +19) {} |
|
|
| exprclosures.js:1:7:1:21 | function(x) x+1 |
|
|
| generators.js:1:1:4:1 | functio ... i++;\\n} |
|
|
| generators.js:6:2:6:19 | function* bar() {} |
|
|
| restparms.js:1:1:2:1 | functio ... ys) {\\n} |
|
|
| tst.js:1:1:1:15 | function A() {} |
|
|
| tst.js:2:1:2:16 | function B(x) {} |
|
|
| tst.js:3:1:3:19 | function C(x, y) {} |
|
|
| tst.js:4:9:4:21 | function() {} |
|
|
| tst.js:5:2:5:15 | function(x) {} |
|
|
| tst.js:6:2:6:18 | function(x, y) {} |
|
|
| tst.js:7:9:7:23 | function h() {} |
|
|
| tst.js:9:1:9:24 | functio ... nts) {} |
|
|
| tst.js:10:1:10:31 | functio ... ents; } |
|
|
| tst.js:11:1:11:35 | functio ... ts; } } |
|
|
| tst.js:12:1:12:44 | functio ... s) {} } |
|
|
| tst.js:14:1:14:37 | functio ... s[0]; } |
|
|
test_getBodyStmt
|
|
| arrowfns.js:3:12:3:41 | () => { ... "); ; } | 0 | arrowfns.js:3:20:3:37 | alert("Wake up!"); |
|
|
| arrowfns.js:3:12:3:41 | () => { ... "); ; } | 1 | arrowfns.js:3:39:3:39 | ; |
|
|
| generators.js:1:1:4:1 | functio ... i++;\\n} | 0 | generators.js:2:3:3:14 | for (va ... ld i++; |
|
|
| tst.js:10:1:10:31 | functio ... ents; } | 0 | tst.js:10:16:10:29 | var arguments; |
|
|
| tst.js:11:1:11:35 | functio ... ts; } } | 0 | tst.js:11:16:11:33 | { var arguments; } |
|
|
| tst.js:12:1:12:44 | functio ... s) {} } | 0 | tst.js:12:16:12:42 | try { } ... nts) {} |
|
|
| tst.js:14:1:14:37 | functio ... s[0]; } | 0 | tst.js:14:16:14:35 | return arguments[0]; |
|
|
test_isGenerator
|
|
| generators.js:1:1:4:1 | functio ... i++;\\n} |
|
|
| generators.js:6:2:6:19 | function* bar() {} |
|
|
test_usesArgumentsObject
|
|
| tst.js:14:1:14:37 | functio ... s[0]; } |
|
|
test_getEnclosingStmt
|
|
| arrowfns.js:1:24:1:36 | s => s.length | arrowfns.js:1:1:1:38 | ["a", " ... ength); |
|
|
| arrowfns.js:2:13:2:23 | () => ++cnt | arrowfns.js:2:1:2:31 | setInte ... 1000); |
|
|
| arrowfns.js:3:12:3:41 | () => { ... "); ; } | arrowfns.js:3:1:3:50 | setTime ... 60000); |
|
|
| defaultargs.js:1:1:1:24 | functio ... +19) {} | defaultargs.js:1:1:1:24 | functio ... +19) {} |
|
|
| exprclosures.js:1:7:1:21 | function(x) x+1 | exprclosures.js:1:1:1:23 | a.map(f ... ) x+1); |
|
|
| generators.js:1:1:4:1 | functio ... i++;\\n} | generators.js:1:1:4:1 | functio ... i++;\\n} |
|
|
| generators.js:6:2:6:19 | function* bar() {} | generators.js:6:1:6:23 | (functi ... {})(); |
|
|
| restparms.js:1:1:2:1 | functio ... ys) {\\n} | restparms.js:1:1:2:1 | functio ... ys) {\\n} |
|
|
| tst.js:1:1:1:15 | function A() {} | tst.js:1:1:1:15 | function A() {} |
|
|
| tst.js:2:1:2:16 | function B(x) {} | tst.js:2:1:2:16 | function B(x) {} |
|
|
| tst.js:3:1:3:19 | function C(x, y) {} | tst.js:3:1:3:19 | function C(x, y) {} |
|
|
| tst.js:4:9:4:21 | function() {} | tst.js:4:1:4:22 | var f = ... n() {}; |
|
|
| tst.js:5:2:5:15 | function(x) {} | tst.js:5:1:5:16 | !function(x) {}; |
|
|
| tst.js:6:2:6:18 | function(x, y) {} | tst.js:6:1:6:20 | (function(x, y) {}); |
|
|
| tst.js:7:9:7:23 | function h() {} | tst.js:7:1:7:24 | var g = ... h() {}; |
|
|
| tst.js:9:1:9:24 | functio ... nts) {} | tst.js:9:1:9:24 | functio ... nts) {} |
|
|
| tst.js:10:1:10:31 | functio ... ents; } | tst.js:10:1:10:31 | functio ... ents; } |
|
|
| tst.js:11:1:11:35 | functio ... ts; } } | tst.js:11:1:11:35 | functio ... ts; } } |
|
|
| tst.js:12:1:12:44 | functio ... s) {} } | tst.js:12:1:12:44 | functio ... s) {} } |
|
|
| tst.js:14:1:14:37 | functio ... s[0]; } | tst.js:14:1:14:37 | functio ... s[0]; } |
|
|
test_isRestParameter
|
|
| restparms.js:1:18:1:19 | ys |
|
|
test_ReturnStmt
|
|
| tst.js:14:1:14:37 | functio ... s[0]; } | tst.js:14:16:14:35 | return arguments[0]; |
|