Skip to content

Commit 0243267

Browse files
committed
Shared: Remove deprecated code
1 parent d6abd4c commit 0243267

6 files changed

Lines changed: 21 additions & 700 deletions

File tree

shared/controlflow/codeql/controlflow/Cfg.qll

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -252,20 +252,9 @@ module MakeWithSplitting<
252252
rank[i + 1](ControlFlowTree child, int j | child = this.getChildNode(j) | child order by j)
253253
}
254254

255-
/** Gets the first child node of this element. */
256-
deprecated final AstNode getFirstChildNode() { result = this.getChildTreeRanked(0) }
257-
258255
/** Gets the first child node of this element. */
259256
final ControlFlowTree getFirstChildTree() { result = this.getChildTreeRanked(0) }
260257

261-
/** Gets the last child node of this node. */
262-
deprecated final AstNode getLastChildElement() {
263-
exists(int last |
264-
result = this.getChildTreeRanked(last) and
265-
not exists(this.getChildTreeRanked(last + 1))
266-
)
267-
}
268-
269258
/** Gets the last child node of this node. */
270259
final ControlFlowTree getLastChildTree() {
271260
exists(int last |

shared/dataflow/codeql/dataflow/DataFlow.qll

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -784,19 +784,6 @@ private module DataFlowMakeCore<LocationSig Location, InputSig<Location> Lang> {
784784

785785
/** Gets the location of this node. */
786786
Location getLocation() { result = this.getNode().getLocation() }
787-
788-
/**
789-
* Holds if this element is at the specified location.
790-
* The location spans column `startcolumn` of line `startline` to
791-
* column `endcolumn` of line `endline` in file `filepath`.
792-
* For more information, see
793-
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
794-
*/
795-
deprecated predicate hasLocationInfo(
796-
string filepath, int startline, int startcolumn, int endline, int endcolumn
797-
) {
798-
this.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
799-
}
800787
}
801788

802789
/**
@@ -853,19 +840,6 @@ private module DataFlowMakeCore<LocationSig Location, InputSig<Location> Lang> {
853840
/** Gets a textual representation of this element. */
854841
string toString() { result = super.toString() }
855842

856-
/**
857-
* Holds if this element is at the specified location.
858-
* The location spans column `startcolumn` of line `startline` to
859-
* column `endcolumn` of line `endline` in file `filepath`.
860-
* For more information, see
861-
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
862-
*/
863-
deprecated predicate hasLocationInfo(
864-
string filepath, int startline, int startcolumn, int endline, int endcolumn
865-
) {
866-
super.hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
867-
}
868-
869843
/** Gets the underlying `Node`. */
870844
Node getNode() { result = super.getNode() }
871845

shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2531,36 +2531,6 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
25312531

25322532
/** Holds if this node is a sink. */
25332533
final predicate isSink() { this instanceof PathNodeSink }
2534-
2535-
/**
2536-
* Holds if this element is at the specified location.
2537-
* The location spans column `startcolumn` of line `startline` to
2538-
* column `endcolumn` of line `endline` in file `filepath`.
2539-
* For more information, see
2540-
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
2541-
*/
2542-
overlay[caller?]
2543-
pragma[inline]
2544-
deprecated final predicate hasLocationInfo(
2545-
string filepath, int startline, int startcolumn, int endline, int endcolumn
2546-
) {
2547-
this.getLocation()
2548-
.hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
2549-
}
2550-
2551-
/**
2552-
* DEPRECATED: This functionality is no longer available.
2553-
*
2554-
* Holds if this node is a grouping of source nodes.
2555-
*/
2556-
deprecated final predicate isSourceGroup(string group) { none() }
2557-
2558-
/**
2559-
* DEPRECATED: This functionality is no longer available.
2560-
*
2561-
* Holds if this node is a grouping of sink nodes.
2562-
*/
2563-
deprecated final predicate isSinkGroup(string group) { none() }
25642534
}
25652535

25662536
/** Holds if `n1.getASuccessor() = n2` and `n2` can reach a sink. */

shared/dataflow/codeql/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,6 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
2727
private import Aliases
2828

2929
module DataFlowImplCommonPublic {
30-
/**
31-
* DEPRECATED: Generally, a custom `FlowState` type should be used instead,
32-
* but `string` can of course still be used without referring to this
33-
* module.
34-
*
35-
* Provides `FlowState = string`.
36-
*/
37-
deprecated module FlowStateString {
38-
/** A state value to track during data flow. */
39-
deprecated class FlowState = string;
40-
41-
/**
42-
* The default state, which is used when the state is unspecified for a source
43-
* or a sink.
44-
*/
45-
deprecated class FlowStateEmpty extends FlowState {
46-
FlowStateEmpty() { this = "" }
47-
}
48-
}
49-
5030
private newtype TFlowFeature =
5131
TFeatureHasSourceCallContext() or
5232
TFeatureHasSinkCallContext() or

shared/dataflow/codeql/dataflow/internal/DataFlowImplStage1.qll

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,21 +1847,6 @@ module MakeImplStage1<LocationSig Location, InputSig<Location> Lang> {
18471847
/** Gets the location of this node. */
18481848
Location getLocation() { result = this.getNodeEx().getLocation() }
18491849

1850-
/**
1851-
* Holds if this element is at the specified location.
1852-
* The location spans column `startcolumn` of line `startline` to
1853-
* column `endcolumn` of line `endline` in file `filepath`.
1854-
* For more information, see
1855-
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
1856-
*/
1857-
overlay[caller?]
1858-
pragma[inline]
1859-
deprecated predicate hasLocationInfo(
1860-
string filepath, int startline, int startcolumn, int endline, int endcolumn
1861-
) {
1862-
this.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
1863-
}
1864-
18651850
/** Gets the underlying `Node`. */
18661851
final Node getNode() { this.getNodeEx().projectToNode() = result }
18671852

0 commit comments

Comments
 (0)