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 55private import javascript
66private import semmle.javascript.dataflow.internal.StepSummary
77private import semmle.javascript.dataflow.internal.PreCallGraphStep
8+ private import semmle.javascript.internal.NameResolution
89
910cached
1011module CallGraph {
1112 /** Gets the function referenced by `node`, as determined by the type inference. */
1213 cached
1314 Function getAFunctionValue ( AnalyzedNode node ) {
1415 result = node .getAValue ( ) .( AbstractCallable ) .getFunction ( )
16+ or
17+ node = DataFlow:: valueNode ( NameResolution:: trackFunctionValue ( result ) )
1518 }
1619
1720 /** 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
22missingCallee
33| constructor-field.ts:40:5:40:14 | f3.build() | constructor-field.ts:13:3:13:12 | build() {} | -1 | calls |
44| 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 |
65badAnnotation
76accessorCall
87| 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