JS: Show all accessor calls in CG test

This commit is contained in:
Asger Feldthaus
2022-04-07 12:37:02 +02:00
parent 37a76f4441
commit ddb682b181
2 changed files with 15 additions and 0 deletions

View File

@@ -3,3 +3,14 @@ missingCallee
| constructor-field.ts:40:5:40:14 | f3.build() | constructor-field.ts:13:3:13:12 | build() {} | -1 | calls |
| constructor-field.ts:71:1:71:11 | bf3.build() | constructor-field.ts:13:3:13:12 | build() {} | -1 | calls |
badAnnotation
accessorCall
| accessors.js:5:3:5:12 | get f() {} | accessors.js:8:8:8:13 | (x) {} |
| accessors.js:8:3:8:13 | set f(x) {} | accessors.js:8:8:8:13 | (x) {} |
| accessors.js:12:1:12:5 | obj.f | accessors.js:5:8:5:12 | () {} |
| accessors.js:15:1:15:5 | obj.f | accessors.js:8:8:8:13 | (x) {} |
| accessors.js:19:3:19:19 | static get f() {} | accessors.js:22:15:22:20 | (x) {} |
| accessors.js:22:3:22:20 | static set f(x) {} | accessors.js:22:15:22:20 | (x) {} |
| accessors.js:26:1:26:3 | C.f | accessors.js:19:15:19:19 | () {} |
| accessors.js:29:1:29:3 | C.f | accessors.js:22:15:22:20 | (x) {} |
| accessors.js:41:1:41:9 | new D().f | accessors.js:34:8:34:12 | () {} |
| accessors.js:44:1:44:9 | new D().f | accessors.js:37:8:37:13 | (x) {} |

View File

@@ -90,3 +90,7 @@ query predicate badAnnotation(string name) {
not name = any(AnnotatedCall cl).getCallTargetName() and
name = any(AnnotatedFunction cl).getCalleeName()
}
query predicate accessorCall(DataFlow::PropRef ref, Function target) {
FlowSteps::calls(ref, target)
}