File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
lib/semmle/javascript/dataflow/internal
test/library-tests/CallGraphs/AnnotatedTest Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 5
5
private import javascript
6
6
private import semmle.javascript.dataflow.internal.StepSummary
7
7
private import semmle.javascript.dataflow.internal.PreCallGraphStep
8
+ private import semmle.javascript.internal.NameResolution
8
9
9
10
cached
10
11
module CallGraph {
11
12
/** Gets the function referenced by `node`, as determined by the type inference. */
12
13
cached
13
14
Function getAFunctionValue ( AnalyzedNode node ) {
14
15
result = node .getAValue ( ) .( AbstractCallable ) .getFunction ( )
16
+ or
17
+ node = DataFlow:: valueNode ( NameResolution:: trackFunctionValue ( result ) )
15
18
}
16
19
17
20
/** Holds if the type inferred for `node` is indefinite due to global flow. */
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ spuriousCallee
2
2
missingCallee
3
3
| constructor-field.ts:40:5:40:14 | f3.build() | constructor-field.ts:13:3:13:12 | build() {} | -1 | calls |
4
4
| constructor-field.ts:71:1:71:11 | bf3.build() | constructor-field.ts:13:3:13:12 | build() {} | -1 | calls |
5
- | reExportLibClient.js:4:1:4:6 | ns.f() | lib.js:3:2:3:14 | function() {} | -1 | calls |
6
5
badAnnotation
7
6
accessorCall
8
7
| accessors.js:12:1:12:5 | obj.f | accessors.js:5:8:5:12 | () {} |
You can’t perform that action at this time.
0 commit comments