mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
JS: Add clause to getReturn/getInstance
This commit is contained in:
@@ -840,10 +840,16 @@ module API {
|
||||
Node getLastParameter() { result = getParameter(getNumArgument() - 1) }
|
||||
|
||||
/** Gets the API node for the return value of this call. */
|
||||
Node getReturn() { result.getAnImmediateUse() = this }
|
||||
Node getReturn() {
|
||||
result = callee.getReturn() and
|
||||
result.getAnImmediateUse() = this
|
||||
}
|
||||
|
||||
/** Gets the API node for the object constructed by this invocation. */
|
||||
Node getInstance() { result.getAnImmediateUse() = this }
|
||||
Node getInstance() {
|
||||
result = callee.getInstance() and
|
||||
result.getAnImmediateUse() = this
|
||||
}
|
||||
}
|
||||
|
||||
/** A call connected to the API graph. */
|
||||
|
||||
Reference in New Issue
Block a user