File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
javascript/ql/src/semmle/javascript/dataflow Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,11 @@ module DataFlow {
122122 CallGraph:: getAFunctionReference ( result , 0 ) .flowsTo ( this )
123123 }
124124
125+ /** Gets a function value that may reach this node with the given `imprecision` level. */
126+ final FunctionNode getAFunctionValue ( int imprecision ) {
127+ CallGraph:: getAFunctionReference ( result , imprecision ) .flowsTo ( this )
128+ }
129+
125130 /**
126131 * Gets a function value that may reach this node,
127132 * possibly derived from a partial function invocation.
Original file line number Diff line number Diff line change @@ -147,15 +147,16 @@ class InvokeNode extends DataFlow::SourceNode {
147147 * To alter the call graph as seen by the interprocedural data flow libraries, override
148148 * the `getACallee(int imprecision)` predicate instead.
149149 */
150- final Function getACallee ( ) { result = getACallee ( _ ) }
150+ final Function getACallee ( ) { result = getACallee ( 0 ) }
151151
152152 /**
153153 * Gets a callee of this call site where `imprecision` is a heuristic measure of how
154154 * likely it is that `callee` is only suggested as a potential callee due to
155155 * imprecise analysis of global variables and is not, in fact, a viable callee at all.
156156 *
157157 * Callees with imprecision zero, in particular, have either been derived without
158- * considering global variables, or are calls to a global variable within the same file.
158+ * considering global variables, or are calls to a global variable within the same file,
159+ * or a global variable that has unique definition within the project.
159160 *
160161 * This predicate can be overridden to alter the call graph used by the interprocedural
161162 * data flow libraries.
You can’t perform that action at this time.
0 commit comments