mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
JS: Default to imprecision zero by default
This commit is contained in:
@@ -122,6 +122,11 @@ module DataFlow {
|
||||
CallGraph::getAFunctionReference(result, 0).flowsTo(this)
|
||||
}
|
||||
|
||||
/** Gets a function value that may reach this node with the given `imprecision` level. */
|
||||
final FunctionNode getAFunctionValue(int imprecision) {
|
||||
CallGraph::getAFunctionReference(result, imprecision).flowsTo(this)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a function value that may reach this node,
|
||||
* possibly derived from a partial function invocation.
|
||||
|
||||
@@ -147,7 +147,7 @@ class InvokeNode extends DataFlow::SourceNode {
|
||||
* To alter the call graph as seen by the interprocedural data flow libraries, override
|
||||
* the `getACallee(int imprecision)` predicate instead.
|
||||
*/
|
||||
final Function getACallee() { result = getACallee(_) }
|
||||
final Function getACallee() { result = getACallee(0) }
|
||||
|
||||
/**
|
||||
* Gets a callee of this call site where `imprecision` is a heuristic measure of how
|
||||
@@ -155,7 +155,8 @@ class InvokeNode extends DataFlow::SourceNode {
|
||||
* imprecise analysis of global variables and is not, in fact, a viable callee at all.
|
||||
*
|
||||
* Callees with imprecision zero, in particular, have either been derived without
|
||||
* considering global variables, or are calls to a global variable within the same file.
|
||||
* considering global variables, or are calls to a global variable within the same file,
|
||||
* or a global variable that has unique definition within the project.
|
||||
*
|
||||
* This predicate can be overridden to alter the call graph used by the interprocedural
|
||||
* data flow libraries.
|
||||
|
||||
Reference in New Issue
Block a user