JS: document new behavior of overriding InvokeNode.getACallee()

This commit is contained in:
Asger F
2019-02-26 16:09:19 +00:00
parent a9f8a53dac
commit eaf3f52372
2 changed files with 10 additions and 1 deletions

View File

@@ -83,7 +83,12 @@ class InvokeNode extends DataFlow::SourceNode {
/** Gets an abstract value representing possible callees of this call site. */
AbstractValue getACalleeValue() { result = InvokeNode::getACalleeValue(this) }
/** Gets a potential callee of this call site. */
/**
* Gets a potential callee of this call site.
*
* To alter the call graph as seen by the interprocedural data flow libraries, override
* the `getACallee(int imprecision)` predicate instead.
*/
Function getACallee() { result = InvokeNode::getACallee(this) }
/**
@@ -93,6 +98,9 @@ class InvokeNode extends DataFlow::SourceNode {
*
* 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.
*
* This predicate can be overridden to alter the call graph used by the interprocedural
* data flow libraries.
*/
Function getACallee(int imprecision) { result = InvokeNode::getACallee(this, imprecision) }