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 {
6161 function = cls .getConstructor ( ) and
6262 cls .getAClassReference ( t .continue ( ) ) .flowsTo ( result )
6363 )
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 ( ) )
6475 }
6576
6677 /**
Original file line number Diff line number Diff line change @@ -2,5 +2,4 @@ spuriousCallee
22missingCallee
33| constructor-field.ts:40:5:40:14 | f3.build() | constructor-field.ts:13:3:13:12 | build() {} | -1 |
44| 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 |
65badAnnotation
You can’t perform that action at this time.
0 commit comments