Skip to content

Commit 01a7f7a

Browse files
committed
all: used Erik's script to delete outdated deprecations
1 parent 8a1987a commit 01a7f7a

File tree

105 files changed

+1
-2224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+1
-2224
lines changed

cpp/ql/lib/semmle/code/cpp/dataflow/DataFlow.qll

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,3 @@
1818
*/
1919

2020
import cpp
21-
22-
/**
23-
* DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow` instead.
24-
*
25-
* Provides classes for performing local (intra-procedural) and
26-
* global (inter-procedural) data flow analyses.
27-
*/
28-
deprecated module DataFlow {
29-
private import semmle.code.cpp.dataflow.internal.DataFlowImplSpecific
30-
private import codeql.dataflow.DataFlow
31-
import DataFlowMake<Location, CppOldDataFlow>
32-
import Public
33-
}

cpp/ql/lib/semmle/code/cpp/dataflow/TaintTracking.qll

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,3 @@
1616
*/
1717

1818
import semmle.code.cpp.dataflow.DataFlow
19-
20-
/**
21-
* DEPRECATED: Use `semmle.code.cpp.dataflow.new.TaintTracking` instead.
22-
*
23-
* Provides classes for performing local (intra-procedural) and
24-
* global (inter-procedural) taint-tracking analyses.
25-
*/
26-
deprecated module TaintTracking {
27-
import semmle.code.cpp.dataflow.internal.TaintTrackingUtil
28-
private import semmle.code.cpp.dataflow.internal.DataFlowImplSpecific
29-
private import semmle.code.cpp.dataflow.internal.TaintTrackingImplSpecific
30-
private import codeql.dataflow.TaintTracking
31-
import TaintFlowMake<Location, CppOldDataFlow, CppOldTaintTracking>
32-
}

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowUtil.qll

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -98,19 +98,6 @@ class Node extends TNode {
9898
/** Gets the location of this element. */
9999
Location getLocation() { none() } // overridden by subclasses
100100

101-
/**
102-
* Holds if this element is at the specified location.
103-
* The location spans column `startcolumn` of line `startline` to
104-
* column `endcolumn` of line `endline` in file `filepath`.
105-
* For more information, see
106-
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
107-
*/
108-
deprecated predicate hasLocationInfo(
109-
string filepath, int startline, int startcolumn, int endline, int endcolumn
110-
) {
111-
this.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
112-
}
113-
114101
/**
115102
* Gets an upper bound on the type of this node.
116103
*/

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -538,19 +538,6 @@ class Node extends TIRDataFlowNode {
538538
none() // overridden by subclasses
539539
}
540540

541-
/**
542-
* Holds if this element is at the specified location.
543-
* The location spans column `startcolumn` of line `startline` to
544-
* column `endcolumn` of line `endline` in file `filepath`.
545-
* For more information, see
546-
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
547-
*/
548-
deprecated predicate hasLocationInfo(
549-
string filepath, int startline, int startcolumn, int endline, int endcolumn
550-
) {
551-
this.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
552-
}
553-
554541
/** Gets a textual representation of this element. */
555542
cached
556543
final string toString() {

cpp/ql/lib/semmle/code/cpp/security/Security.qll

Lines changed: 0 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -42,58 +42,6 @@ class SecurityOptions extends string {
4242
)
4343
}
4444

45-
/**
46-
* The argument of the given function is filled in from user input.
47-
*/
48-
deprecated predicate userInputArgument(FunctionCall functionCall, int arg) {
49-
exists(string fname |
50-
functionCall.getTarget().hasGlobalOrStdName(fname) and
51-
exists(functionCall.getArgument(arg)) and
52-
(
53-
fname = ["fread", "fgets", "fgetws", "gets"] and arg = 0
54-
or
55-
fname = "scanf" and arg >= 1
56-
or
57-
fname = "fscanf" and arg >= 2
58-
)
59-
or
60-
functionCall.getTarget().hasGlobalName(fname) and
61-
exists(functionCall.getArgument(arg)) and
62-
fname = "getaddrinfo" and
63-
arg = 3
64-
)
65-
or
66-
exists(RemoteFlowSourceFunction remote, FunctionOutput output |
67-
functionCall.getTarget() = remote and
68-
output.isParameterDerefOrQualifierObject(arg) and
69-
remote.hasRemoteFlowSource(output, _)
70-
)
71-
}
72-
73-
/**
74-
* The return value of the given function is filled in from user input.
75-
*/
76-
deprecated predicate userInputReturned(FunctionCall functionCall) {
77-
exists(string fname |
78-
functionCall.getTarget().getName() = fname and
79-
(
80-
fname = ["fgets", "gets"] or
81-
this.userInputReturn(fname)
82-
)
83-
)
84-
or
85-
exists(RemoteFlowSourceFunction remote, FunctionOutput output |
86-
functionCall.getTarget() = remote and
87-
(output.isReturnValue() or output.isReturnValueDeref()) and
88-
remote.hasRemoteFlowSource(output, _)
89-
)
90-
}
91-
92-
/**
93-
* DEPRECATED: Users should override `userInputReturned()` instead.
94-
*/
95-
deprecated predicate userInputReturn(string function) { none() }
96-
9745
/**
9846
* The argument of the given function is used for running a process or loading
9947
* a library.
@@ -108,29 +56,6 @@ class SecurityOptions extends string {
10856
function = ["LoadLibrary", "LoadLibraryA", "LoadLibraryW"] and arg = 0
10957
}
11058

111-
/**
112-
* This predicate should hold if the expression is directly
113-
* computed from user input. Such expressions are treated as
114-
* sources of taint.
115-
*/
116-
deprecated predicate isUserInput(Expr expr, string cause) {
117-
exists(FunctionCall fc, int i |
118-
this.userInputArgument(fc, i) and
119-
expr = fc.getArgument(i) and
120-
cause = fc.getTarget().getName()
121-
)
122-
or
123-
exists(FunctionCall fc |
124-
this.userInputReturned(fc) and
125-
expr = fc and
126-
cause = fc.getTarget().getName()
127-
)
128-
or
129-
commandLineArg(expr) and cause = "argv"
130-
or
131-
expr.(EnvironmentRead).getSourceDescription() = cause
132-
}
133-
13459
/**
13560
* This predicate should hold if the expression raises privilege for the
13661
* current session. The default definition only holds true for some
@@ -173,21 +98,6 @@ predicate argv(Parameter argv) {
17398
/** Convenience accessor for SecurityOptions.isPureFunction */
17499
predicate isPureFunction(string name) { exists(SecurityOptions opts | opts.isPureFunction(name)) }
175100

176-
/** Convenience accessor for SecurityOptions.userInputArgument */
177-
deprecated predicate userInputArgument(FunctionCall functionCall, int arg) {
178-
exists(SecurityOptions opts | opts.userInputArgument(functionCall, arg))
179-
}
180-
181-
/** Convenience accessor for SecurityOptions.userInputReturn */
182-
deprecated predicate userInputReturned(FunctionCall functionCall) {
183-
exists(SecurityOptions opts | opts.userInputReturned(functionCall))
184-
}
185-
186-
/** Convenience accessor for SecurityOptions.isUserInput */
187-
deprecated predicate isUserInput(Expr expr, string cause) {
188-
exists(SecurityOptions opts | opts.isUserInput(expr, cause))
189-
}
190-
191101
/** Convenience accessor for SecurityOptions.isProcessOperationArgument */
192102
predicate isProcessOperationArgument(string function, int arg) {
193103
exists(SecurityOptions opts | opts.isProcessOperationArgument(function, arg))

cpp/ql/lib/semmle/code/cpp/security/SecurityOptions.qll

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,4 @@ class CustomSecurityOptions extends SecurityOptions {
2222
// for example: (function = "MySpecialSqlFunction" and arg = 0)
2323
none() // rules to match custom functions replace this line
2424
}
25-
26-
deprecated override predicate userInputArgument(FunctionCall functionCall, int arg) {
27-
SecurityOptions.super.userInputArgument(functionCall, arg)
28-
or
29-
exists(string fname |
30-
functionCall.getTarget().hasGlobalName(fname) and
31-
exists(functionCall.getArgument(arg)) and
32-
// --- custom functions that return user input via one of their arguments:
33-
// 'arg' is the 0-based index of the argument that is used to return user input
34-
// for example: (fname = "readXmlInto" and arg = 1)
35-
none() // rules to match custom functions replace this line
36-
)
37-
}
38-
39-
deprecated override predicate userInputReturned(FunctionCall functionCall) {
40-
SecurityOptions.super.userInputReturned(functionCall)
41-
or
42-
exists(string fname |
43-
functionCall.getTarget().hasGlobalName(fname) and
44-
// --- custom functions that return user input via their return value:
45-
// for example: fname = "xmlReadAttribute"
46-
none() // rules to match custom functions replace this line
47-
)
48-
}
4925
}

csharp/ql/lib/semmle/code/csharp/controlflow/Guards.qll

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -478,11 +478,6 @@ class DereferenceableExpr extends Expr {
478478
}
479479
}
480480

481-
/**
482-
* DEPRECATED: Use `EnumerableCollectionExpr` instead.
483-
*/
484-
deprecated class CollectionExpr = EnumerableCollectionExpr;
485-
486481
/**
487482
* An expression that evaluates to a collection. That is, an expression whose
488483
* (transitive, reflexive) base type is `IEnumerable`.

csharp/ql/lib/semmle/code/csharp/dataflow/FlowSummary.qll

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,6 @@ import csharp
44
private import internal.FlowSummaryImpl as Impl
55
private import internal.DataFlowDispatch as DataFlowDispatch
66

7-
deprecated class ParameterPosition = DataFlowDispatch::ParameterPosition;
8-
9-
deprecated class ArgumentPosition = DataFlowDispatch::ArgumentPosition;
10-
11-
deprecated class SummaryComponent = Impl::Private::SummaryComponent;
12-
13-
deprecated module SummaryComponent = Impl::Private::SummaryComponent;
14-
15-
deprecated class SummaryComponentStack = Impl::Private::SummaryComponentStack;
16-
17-
deprecated module SummaryComponentStack = Impl::Private::SummaryComponentStack;
18-
19-
deprecated class RequiredSummaryComponentStack = Impl::Private::RequiredSummaryComponentStack;
20-
217
class SummarizedCallable = Impl::Public::SummarizedCallable;
228

239
class Provenance = Impl::Public::Provenance;

csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -463,64 +463,6 @@ module Ssa {
463463
*/
464464
final AssignableDefinition getADefinition() { result = SsaImpl::getADefinition(this) }
465465

466-
/**
467-
* DEPRECATED.
468-
*
469-
* Holds if this definition updates a captured local scope variable, and the updated
470-
* value may be read from the implicit entry definition `def` using one or more calls
471-
* (as indicated by `additionalCalls`), starting from call `c`.
472-
*
473-
* Example:
474-
*
475-
* ```csharp
476-
* class C {
477-
* void M1() {
478-
* int i = 0;
479-
* void M2() => System.Console.WriteLine(i);
480-
* i = 1;
481-
* M2();
482-
* }
483-
* }
484-
* ```
485-
*
486-
* If this definition is the update of `i` on line 5, then the value may be read inside
487-
* `M2` via the call on line 6.
488-
*/
489-
deprecated final predicate isCapturedVariableDefinitionFlowIn(
490-
ImplicitEntryDefinition def, ControlFlow::Nodes::ElementNode c, boolean additionalCalls
491-
) {
492-
none()
493-
}
494-
495-
/**
496-
* DEPRECATED.
497-
*
498-
* Holds if this definition updates a captured local scope variable, and the updated
499-
* value may be read from the implicit call definition `cdef` using one or more calls
500-
* (as indicated by `additionalCalls`).
501-
*
502-
* Example:
503-
*
504-
* ```csharp
505-
* class C {
506-
* void M1() {
507-
* int i = 0;
508-
* void M2() { i = 2; };
509-
* M2();
510-
* System.Console.WriteLine(i);
511-
* }
512-
* }
513-
* ```
514-
*
515-
* If this definition is the update of `i` on line 4, then the value may be read outside
516-
* of `M2` via the call on line 5.
517-
*/
518-
deprecated final predicate isCapturedVariableDefinitionFlowOut(
519-
ImplicitCallDefinition cdef, boolean additionalCalls
520-
) {
521-
none()
522-
}
523-
524466
override Element getElement() { result = ad.getElement() }
525467

526468
override string toString() {

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPublic.qll

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,6 @@ class Node extends TNode {
5151

5252
/** Gets the location of this node. */
5353
final Location getLocation() { result = this.(NodeImpl).getLocationImpl() }
54-
55-
/**
56-
* Holds if this element is at the specified location.
57-
* The location spans column `startcolumn` of line `startline` to
58-
* column `endcolumn` of line `endline` in file `filepath`.
59-
* For more information, see
60-
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
61-
*/
62-
deprecated predicate hasLocationInfo(
63-
string filepath, int startline, int startcolumn, int endline, int endcolumn
64-
) {
65-
this.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
66-
}
6754
}
6855

6956
/**

0 commit comments

Comments
 (0)