Skip to content

Commit 3dc09a3

Browse files
committed
Revert changes to shared/generated files
1 parent cbd55f2 commit 3dc09a3

File tree

5 files changed

+25
-31
lines changed

5 files changed

+25
-31
lines changed

ql/lib/codeql/ruby/ast/internal/TreeSitter.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module Ruby {
2828
string getAPrimaryQlClass() { result = "???" }
2929

3030
/** Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs. */
31-
string getPrimaryQlClasses() { result = concat(this.getAPrimaryQlClass(), ",") }
31+
string getPrimaryQlClasses() { result = concat(getAPrimaryQlClass(), ",") }
3232
}
3333

3434
/** A token. */
@@ -40,7 +40,7 @@ module Ruby {
4040
override Location getLocation() { ruby_tokeninfo(this, _, _, result) }
4141

4242
/** Gets a string representation of this element. */
43-
override string toString() { result = this.getValue() }
43+
override string toString() { result = getValue() }
4444

4545
/** Gets the name of the primary QL class for this element. */
4646
override string getAPrimaryQlClass() { result = "Token" }
@@ -1881,7 +1881,7 @@ module Erb {
18811881
string getAPrimaryQlClass() { result = "???" }
18821882

18831883
/** Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs. */
1884-
string getPrimaryQlClasses() { result = concat(this.getAPrimaryQlClass(), ",") }
1884+
string getPrimaryQlClasses() { result = concat(getAPrimaryQlClass(), ",") }
18851885
}
18861886

18871887
/** A token. */
@@ -1893,7 +1893,7 @@ module Erb {
18931893
override Location getLocation() { erb_tokeninfo(this, _, _, result) }
18941894

18951895
/** Gets a string representation of this element. */
1896-
override string toString() { result = this.getValue() }
1896+
override string toString() { result = getValue() }
18971897

18981898
/** Gets the name of the primary QL class for this element. */
18991899
override string getAPrimaryQlClass() { result = "Token" }

ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl.qll

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ abstract class Configuration extends string {
110110
/**
111111
* Holds if data may flow from some source to `sink` for this configuration.
112112
*/
113-
predicate hasFlowTo(Node sink) { this.hasFlow(_, sink) }
113+
predicate hasFlowTo(Node sink) { hasFlow(_, sink) }
114114

115115
/**
116116
* Holds if data may flow from some source to `sink` for this configuration.
117117
*/
118-
predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) }
118+
predicate hasFlowToExpr(DataFlowExpr sink) { hasFlowTo(exprNode(sink)) }
119119

120120
/**
121121
* Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev`
@@ -3170,7 +3170,7 @@ private class AccessPathCons extends AccessPath, TAccessPathCons {
31703170
}
31713171

31723172
override string toString() {
3173-
result = "[" + this.toStringImpl(true) + this.length().toString() + ")]"
3173+
result = "[" + this.toStringImpl(true) + length().toString() + ")]"
31743174
or
31753175
result = "[" + this.toStringImpl(false)
31763176
}
@@ -3309,11 +3309,9 @@ abstract private class PathNodeImpl extends PathNode {
33093309
result = " <" + this.(PathNodeMid).getCallContext().toString() + ">"
33103310
}
33113311

3312-
override string toString() { result = this.getNodeEx().toString() + this.ppAp() }
3312+
override string toString() { result = this.getNodeEx().toString() + ppAp() }
33133313

3314-
override string toStringWithContext() {
3315-
result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx()
3316-
}
3314+
override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() }
33173315

33183316
override predicate hasLocationInfo(
33193317
string filepath, int startline, int startcolumn, int endline, int endcolumn
@@ -3381,11 +3379,11 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid {
33813379

33823380
override PathNodeImpl getASuccessorImpl() {
33833381
// an intermediate step to another intermediate node
3384-
result = this.getSuccMid()
3382+
result = getSuccMid()
33853383
or
33863384
// a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges
33873385
exists(PathNodeMid mid, PathNodeSink sink |
3388-
mid = this.getSuccMid() and
3386+
mid = getSuccMid() and
33893387
mid.getNodeEx() = sink.getNodeEx() and
33903388
mid.getAp() instanceof AccessPathNil and
33913389
sink.getConfiguration() = unbindConf(mid.getConfiguration()) and

ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ abstract class Configuration extends string {
110110
/**
111111
* Holds if data may flow from some source to `sink` for this configuration.
112112
*/
113-
predicate hasFlowTo(Node sink) { this.hasFlow(_, sink) }
113+
predicate hasFlowTo(Node sink) { hasFlow(_, sink) }
114114

115115
/**
116116
* Holds if data may flow from some source to `sink` for this configuration.
117117
*/
118-
predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) }
118+
predicate hasFlowToExpr(DataFlowExpr sink) { hasFlowTo(exprNode(sink)) }
119119

120120
/**
121121
* Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev`
@@ -3170,7 +3170,7 @@ private class AccessPathCons extends AccessPath, TAccessPathCons {
31703170
}
31713171

31723172
override string toString() {
3173-
result = "[" + this.toStringImpl(true) + this.length().toString() + ")]"
3173+
result = "[" + this.toStringImpl(true) + length().toString() + ")]"
31743174
or
31753175
result = "[" + this.toStringImpl(false)
31763176
}
@@ -3309,11 +3309,9 @@ abstract private class PathNodeImpl extends PathNode {
33093309
result = " <" + this.(PathNodeMid).getCallContext().toString() + ">"
33103310
}
33113311

3312-
override string toString() { result = this.getNodeEx().toString() + this.ppAp() }
3312+
override string toString() { result = this.getNodeEx().toString() + ppAp() }
33133313

3314-
override string toStringWithContext() {
3315-
result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx()
3316-
}
3314+
override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() }
33173315

33183316
override predicate hasLocationInfo(
33193317
string filepath, int startline, int startcolumn, int endline, int endcolumn
@@ -3381,11 +3379,11 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid {
33813379

33823380
override PathNodeImpl getASuccessorImpl() {
33833381
// an intermediate step to another intermediate node
3384-
result = this.getSuccMid()
3382+
result = getSuccMid()
33853383
or
33863384
// a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges
33873385
exists(PathNodeMid mid, PathNodeSink sink |
3388-
mid = this.getSuccMid() and
3386+
mid = getSuccMid() and
33893387
mid.getNodeEx() = sink.getNodeEx() and
33903388
mid.getAp() instanceof AccessPathNil and
33913389
sink.getConfiguration() = unbindConf(mid.getConfiguration()) and

ql/lib/codeql/ruby/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ class CallContextSpecificCall extends CallContextCall, TSpecificCall {
937937
}
938938

939939
override predicate relevantFor(DataFlowCallable callable) {
940-
recordDataFlowCallSite(this.getCall(), callable)
940+
recordDataFlowCallSite(getCall(), callable)
941941
}
942942

943943
override predicate matchesCall(DataFlowCall call) { call = this.getCall() }
@@ -1257,7 +1257,7 @@ abstract class AccessPathFront extends TAccessPathFront {
12571257

12581258
TypedContent getHead() { this = TFrontHead(result) }
12591259

1260-
predicate isClearedAt(Node n) { clearsContentCached(n, this.getHead().getContent()) }
1260+
predicate isClearedAt(Node n) { clearsContentCached(n, getHead().getContent()) }
12611261
}
12621262

12631263
class AccessPathFrontNil extends AccessPathFront, TFrontNil {

ql/lib/codeql/ruby/dataflow/internal/tainttracking1/TaintTrackingImpl.qll

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,26 +75,24 @@ abstract class Configuration extends DataFlow::Configuration {
7575
predicate isSanitizer(DataFlow::Node node) { none() }
7676

7777
final override predicate isBarrier(DataFlow::Node node) {
78-
this.isSanitizer(node) or
78+
isSanitizer(node) or
7979
defaultTaintSanitizer(node)
8080
}
8181

8282
/** Holds if taint propagation into `node` is prohibited. */
8383
predicate isSanitizerIn(DataFlow::Node node) { none() }
8484

85-
final override predicate isBarrierIn(DataFlow::Node node) { this.isSanitizerIn(node) }
85+
final override predicate isBarrierIn(DataFlow::Node node) { isSanitizerIn(node) }
8686

8787
/** Holds if taint propagation out of `node` is prohibited. */
8888
predicate isSanitizerOut(DataFlow::Node node) { none() }
8989

90-
final override predicate isBarrierOut(DataFlow::Node node) { this.isSanitizerOut(node) }
90+
final override predicate isBarrierOut(DataFlow::Node node) { isSanitizerOut(node) }
9191

9292
/** Holds if taint propagation through nodes guarded by `guard` is prohibited. */
9393
predicate isSanitizerGuard(DataFlow::BarrierGuard guard) { none() }
9494

95-
final override predicate isBarrierGuard(DataFlow::BarrierGuard guard) {
96-
this.isSanitizerGuard(guard)
97-
}
95+
final override predicate isBarrierGuard(DataFlow::BarrierGuard guard) { isSanitizerGuard(guard) }
9896

9997
/**
10098
* Holds if the additional taint propagation step from `node1` to `node2`
@@ -103,7 +101,7 @@ abstract class Configuration extends DataFlow::Configuration {
103101
predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { none() }
104102

105103
final override predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
106-
this.isAdditionalTaintStep(node1, node2) or
104+
isAdditionalTaintStep(node1, node2) or
107105
defaultAdditionalTaintStep(node1, node2)
108106
}
109107

0 commit comments

Comments
 (0)