mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
add explicit this
This commit is contained in:
@@ -84,8 +84,8 @@ class Assertion extends Comment {
|
||||
string tryExplainFailure() {
|
||||
exists(int i, API::Node nd, string prefix, string suffix |
|
||||
nd = this.lookup(i) and
|
||||
i < getPathLength() and
|
||||
not exists(this.lookup([i + 1 .. getPathLength()])) and
|
||||
i < this.getPathLength() and
|
||||
not exists(this.lookup([i + 1 .. this.getPathLength()])) and
|
||||
prefix = nd + " has no outgoing edge labelled " + this.getEdgeLabel(i) + ";" and
|
||||
if exists(nd.getASuccessor())
|
||||
then
|
||||
|
||||
@@ -42,16 +42,16 @@ class AnnotatedCall extends DataFlow::Node {
|
||||
string getCallTargetName() { result = calls }
|
||||
|
||||
AnnotatedFunction getAnExpectedCallee(string kind_) {
|
||||
result.getCalleeName() = getCallTargetName() and
|
||||
result.getCalleeName() = this.getCallTargetName() and
|
||||
kind = kind_
|
||||
}
|
||||
|
||||
int getBoundArgs() { result = getAnnotation(this.getAstNode(), "boundArgs").toInt() }
|
||||
|
||||
int getBoundArgsOrMinusOne() {
|
||||
result = getBoundArgs()
|
||||
result = this.getBoundArgs()
|
||||
or
|
||||
not exists(getBoundArgs()) and
|
||||
not exists(this.getBoundArgs()) and
|
||||
result = -1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user