Skip to content

Commit bfb653a

Browse files
committed
rename getAReference to getAnImmediateUse
1 parent eb973b3 commit bfb653a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

javascript/ql/src/semmle/javascript/ApiGraphs.qll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,27 @@ module API {
3939
}
4040

4141
/**
42-
* Gets a reference to the API component represented by this node.
42+
* Gets an immediate use of the API component represented by this node.
4343
*
44-
* For example, `require('fs').readFileSync` is a reference to the `readFileSync` member from the
45-
* `fs` module.
44+
* For example, `require('fs').readFileSync` is a an immediate use of the `readFileSync` member
45+
* from the `fs` module.
4646
*
4747
* Unlike `getAUse()`, this predicate only gets the immediate references, not the indirect uses
4848
* found via data flow. This means that in `const x = fs.readFile` only `fs.readFile` is a reference
4949
* to the `readFile` member of `fs`, neither `x` nor any node that `x` flows to is a reference to
5050
* this API component.
5151
*/
52-
DataFlow::SourceNode getAReference() { Impl::use(this, result) }
52+
DataFlow::SourceNode getAnImmediateUse() { Impl::use(this, result) }
5353

5454
/**
5555
* Gets a call to the function represented by this API component.
5656
*/
57-
DataFlow::CallNode getACall() { result = getReturn().getAReference() }
57+
DataFlow::CallNode getACall() { result = getReturn().getAnImmediateUse() }
5858

5959
/**
6060
* Gets a `new` call to the function represented by this API component.
6161
*/
62-
DataFlow::NewNode getAnInstantiation() { result = getInstance().getAReference() }
62+
DataFlow::NewNode getAnInstantiation() { result = getInstance().getAnImmediateUse() }
6363

6464
/**
6565
* Gets an invocation (with our without `new`) to the function represented by this API component.

0 commit comments

Comments
 (0)