File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
src/semmle/javascript/dataflow/internal
test/library-tests/CallGraphs/AnnotatedTest Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,17 @@ module CallGraph {
61
61
function = cls .getConstructor ( ) and
62
62
cls .getAClassReference ( t .continue ( ) ) .flowsTo ( result )
63
63
)
64
+ or
65
+ imprecision = 0 and
66
+ exists ( DataFlow:: FunctionNode outer |
67
+ result = getAFunctionReference ( outer , 0 , t .continue ( ) ) .getAnInvocation ( ) and
68
+ locallyReturnedFunction ( outer , function )
69
+ )
70
+ }
71
+
72
+ cached
73
+ private predicate locallyReturnedFunction ( DataFlow:: FunctionNode outer , DataFlow:: FunctionNode inner ) {
74
+ inner .flowsTo ( outer .getAReturn ( ) )
64
75
}
65
76
66
77
/**
Original file line number Diff line number Diff line change @@ -2,5 +2,4 @@ spuriousCallee
2
2
missingCallee
3
3
| constructor-field.ts:40:5:40:14 | f3.build() | constructor-field.ts:13:3:13:12 | build() {} | -1 |
4
4
| constructor-field.ts:71:1:71:11 | bf3.build() | constructor-field.ts:13:3:13:12 | build() {} | -1 |
5
- | returned-function.js:23:1:23:4 | r2() | returned-function.js:8:9:10:9 | functio ... } | -1 |
6
5
badAnnotation
You can’t perform that action at this time.
0 commit comments