Skip to content

Commit bf3d291

Browse files
committed
Updates after codeql file sync
1 parent 80ac05d commit bf3d291

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,19 @@ class DataFlowCall extends TDataFlowCall {
8383

8484
/** Gets the location of this call. */
8585
Location getLocation() { none() }
86+
87+
/**
88+
* Holds if this element is at the specified location.
89+
* The location spans column `startcolumn` of line `startline` to
90+
* column `endcolumn` of line `endline` in file `filepath`.
91+
* For more information, see
92+
* [Locations](https://help.semmle.com/QL/learn-ql/ql/locations.html).
93+
*/
94+
predicate hasLocationInfo(
95+
string filepath, int startline, int startcolumn, int endline, int endcolumn
96+
) {
97+
getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
98+
}
8699
}
87100

88101
/**

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,12 @@ class DataFlowExpr = CfgNodes::ExprCfgNode;
726726

727727
int accessPathLimit() { result = 5 }
728728

729+
/**
730+
* Holds if access paths with `c` at their head always should be tracked at high
731+
* precision. This disables adaptive access path precision for such access paths.
732+
*/
733+
predicate forceHighPrecision(Content c) { none() }
734+
729735
/** The unit type. */
730736
private newtype TUnit = TMkUnit()
731737

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ private import codeql.ruby.dataflow.FlowSummary as FlowSummary
1414
/** Holds is `i` is a valid parameter position. */
1515
predicate parameterPosition(int i) { i in [-2 .. 10] }
1616

17+
/** Gets the parameter position of the instance parameter. */
18+
int instanceParameterPosition() { none() } // disables implicit summary flow to `this` for callbacks
19+
1720
/** Gets the synthesized summary data-flow node for the given values. */
1821
Node summaryNode(SummarizedCallable c, SummaryNodeState state) { result = TSummaryNode(c, state) }
1922

ql/test/TestUtilities/InlineExpectationsTestPrivate.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import codeql.ruby.ast.internal.TreeSitter
44
/**
55
* A class representing line comments in Ruby.
66
*/
7-
class LineComment extends Ruby::Comment {
7+
class ExpectationComment extends Ruby::Comment {
88
string getContents() { result = this.getValue().suffix(1) }
99
}

0 commit comments

Comments
 (0)