Skip to content

Commit e93ff86

Browse files
authored
Merge pull request #10075 from erik-krogh/depOld
delete old deprecations
2 parents 78756bd + 6b9f015 commit e93ff86

File tree

31 files changed

+39
-1030
lines changed

31 files changed

+39
-1030
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* All deprecated predicates/classes/modules that have been deprecated for over a year have been
5+
deleted.
6+

cpp/ql/lib/semmle/code/cpp/models/implementations/StdPair.qll

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ private class StdPair extends ClassTemplateInstantiation {
1111
StdPair() { this.hasQualifiedName(["std", "bsl"], "pair") }
1212
}
1313

14-
/**
15-
* DEPRECATED: This is now called `StdPair` and is a private part of the
16-
* library implementation.
17-
*/
18-
deprecated class StdPairClass = StdPair;
19-
2014
/**
2115
* Any of the single-parameter constructors of `std::pair` that takes a reference to an
2216
* instantiation of `std::pair`. These constructors allow conversion between pair types when the

cpp/ql/lib/semmle/code/cpp/models/interfaces/FlowSource.qll

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ abstract class RemoteFlowSourceFunction extends Function {
2727
predicate hasSocketInput(FunctionInput input) { none() }
2828
}
2929

30-
/**
31-
* DEPRECATED: Use `RemoteFlowSourceFunction` instead.
32-
*
33-
* A library function that returns data that may be read from a network connection.
34-
*/
35-
deprecated class RemoteFlowFunction = RemoteFlowSourceFunction;
36-
3730
/**
3831
* A library function that returns data that is directly controlled by a user.
3932
*/
@@ -44,13 +37,6 @@ abstract class LocalFlowSourceFunction extends Function {
4437
abstract predicate hasLocalFlowSource(FunctionOutput output, string description);
4538
}
4639

47-
/**
48-
* DEPRECATED: Use `LocalFlowSourceFunction` instead.
49-
*
50-
* A library function that returns data that is directly controlled by a user.
51-
*/
52-
deprecated class LocalFlowFunction = LocalFlowSourceFunction;
53-
5440
/** A library function that sends data over a network connection. */
5541
abstract class RemoteFlowSinkFunction extends Function {
5642
/**
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* All deprecated predicates/classes/modules that have been deprecated for over a year have been
5+
deleted.
6+

csharp/ql/lib/semmle/code/cil/DataFlow.qll

Lines changed: 0 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -109,125 +109,6 @@ private predicate localTaintStep(DataFlowNode src, DataFlowNode sink) {
109109
src = sink.(UnaryBitwiseOperation).getOperand()
110110
}
111111

112-
deprecated module DefUse {
113-
/**
114-
* A classification of variable references into reads and writes.
115-
*/
116-
private newtype RefKind =
117-
Read() or
118-
Write()
119-
120-
/**
121-
* Holds if the `i`th node of basic block `bb` is a reference to `v`,
122-
* either a read (when `k` is `Read()`) or a write (when `k` is `Write()`).
123-
*/
124-
private predicate ref(BasicBlock bb, int i, StackVariable v, RefKind k) {
125-
exists(ReadAccess ra | bb.getNode(i) = ra |
126-
ra.getTarget() = v and
127-
k = Read()
128-
)
129-
or
130-
exists(VariableUpdate vu | bb.getNode(i) = vu |
131-
vu.getVariable() = v and
132-
k = Write()
133-
)
134-
}
135-
136-
/**
137-
* Gets the (1-based) rank of the reference to `v` at the `i`th node of
138-
* basic block `bb`, which has the given reference kind `k`.
139-
*/
140-
private int refRank(BasicBlock bb, int i, StackVariable v, RefKind k) {
141-
i = rank[result](int j | ref(bb, j, v, _)) and
142-
ref(bb, i, v, k)
143-
}
144-
145-
/**
146-
* Holds if stack variable `v` is live at the beginning of basic block `bb`.
147-
*/
148-
private predicate liveAtEntry(BasicBlock bb, StackVariable v) {
149-
// The first reference to `v` inside `bb` is a read
150-
refRank(bb, _, v, Read()) = 1
151-
or
152-
// There is no reference to `v` inside `bb`, but `v` is live at entry
153-
// to a successor basic block of `bb`
154-
not exists(refRank(bb, _, v, _)) and
155-
liveAtExit(bb, v)
156-
}
157-
158-
/**
159-
* Holds if stack variable `v` is live at the end of basic block `bb`.
160-
*/
161-
private predicate liveAtExit(BasicBlock bb, StackVariable v) {
162-
liveAtEntry(bb.getASuccessor(), v)
163-
}
164-
165-
/**
166-
* Holds if the variable update `vu` reaches rank index `rankix`
167-
* in its own basic block `bb`.
168-
*/
169-
private predicate defReachesRank(BasicBlock bb, VariableUpdate vu, int rankix, StackVariable v) {
170-
exists(int i |
171-
rankix = refRank(bb, i, v, Write()) and
172-
vu = bb.getNode(i)
173-
)
174-
or
175-
defReachesRank(bb, vu, rankix - 1, v) and
176-
rankix = refRank(bb, _, v, Read())
177-
}
178-
179-
/**
180-
* Holds if the variable update `vu` of stack variable `v` reaches the
181-
* end of a basic block `bb`, at which point it is still live, without
182-
* crossing another update.
183-
*/
184-
private predicate defReachesEndOfBlock(BasicBlock bb, VariableUpdate vu, StackVariable v) {
185-
liveAtExit(bb, v) and
186-
(
187-
exists(int last | last = max(refRank(bb, _, v, _)) | defReachesRank(bb, vu, last, v))
188-
or
189-
defReachesStartOfBlock(bb, vu, v) and
190-
not exists(refRank(bb, _, v, Write()))
191-
)
192-
}
193-
194-
pragma[noinline]
195-
private predicate defReachesStartOfBlock(BasicBlock bb, VariableUpdate vu, StackVariable v) {
196-
defReachesEndOfBlock(bb.getAPredecessor(), vu, v)
197-
}
198-
199-
/**
200-
* Holds if the variable update `vu` of stack variable `v` reaches `read` in the
201-
* same basic block without crossing another update of `v`.
202-
*/
203-
private predicate defReachesReadWithinBlock(StackVariable v, VariableUpdate vu, ReadAccess read) {
204-
exists(BasicBlock bb, int rankix, int i |
205-
defReachesRank(bb, vu, rankix, v) and
206-
rankix = refRank(bb, i, v, Read()) and
207-
read = bb.getNode(i)
208-
)
209-
}
210-
211-
/** Holds if the variable update `vu` can be used at the read `use`. */
212-
cached
213-
deprecated predicate variableUpdateUse(StackVariable target, VariableUpdate vu, ReadAccess use) {
214-
defReachesReadWithinBlock(target, vu, use)
215-
or
216-
exists(BasicBlock bb, int i |
217-
exists(refRank(bb, i, target, Read())) and
218-
use = bb.getNode(i) and
219-
defReachesEndOfBlock(bb.getAPredecessor(), vu, target) and
220-
not defReachesReadWithinBlock(target, _, use)
221-
)
222-
}
223-
224-
/** Holds if the update `def` can be used at the read `use`. */
225-
cached
226-
deprecated predicate defUse(StackVariable target, Expr def, ReadAccess use) {
227-
exists(VariableUpdate vu | def = vu.getSource() | variableUpdateUse(target, vu, use))
228-
}
229-
}
230-
231112
/** A node that updates a variable. */
232113
abstract class VariableUpdate extends DataFlowNode {
233114
/** Gets the value assigned, if any. */

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

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)