Skip to content

Commit 8508056

Browse files
authored
Merge pull request github#17349 from erik-krogh/del-deps-sep-2024
All: delete outdated deprecations
2 parents ce2df04 + 4258119 commit 8508056

File tree

171 files changed

+65
-3076
lines changed

Some content is hidden

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

171 files changed

+65
-3076
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
category: breaking
3+
---
4+
* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`.
5+
* Deleted many deprecated dataflow configurations based on `DataFlow::Configuration`.
6+
* Deleted the deprecated `hasQualifiedName` and `isDefined` predicates from the `Declaration` class, use `hasGlobalName` and `hasDefinition` respectively instead.
7+
* Deleted the `getFullSignature` predicate from the `Function` class, use `getIdentityString(Declaration)` from `semmle.code.cpp.Print` instead.
8+
* Deleted the deprecated `freeCall` predicate from `Alloc.qll`. Use `DeallocationExpr` instead.
9+
* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration<explorationLimit>` instead.
10+
* Deleted the deprecated `getFieldExpr` predicate from `ClassAggregateLiteral`, use `getAFieldExpr` instead.
11+
* Deleted the deprecated `getElementExpr` predicate from `ArrayOrVectorAggregateLiteral`, use `getAnElementExpr` instead.

cpp/ql/lib/experimental/semmle/code/cpp/security/PrivateCleartextWrite.qll

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,6 @@ module PrivateCleartextWrite {
3636
}
3737
}
3838

39-
deprecated class WriteConfig extends TaintTracking::Configuration {
40-
WriteConfig() { this = "Write configuration" }
41-
42-
override predicate isSource(DataFlow::Node source) { source instanceof Source }
43-
44-
override predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
45-
46-
override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer }
47-
}
48-
4939
private module WriteConfig implements DataFlow::ConfigSig {
5040
predicate isSource(DataFlow::Node source) { source instanceof Source }
5141

cpp/ql/lib/semmle/code/cpp/Declaration.qll

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,6 @@ class Declaration extends Locatable, @declaration {
6060
*/
6161
string getQualifiedName() { result = underlyingElement(this).(Q::Declaration).getQualifiedName() }
6262

63-
/**
64-
* DEPRECATED: Prefer `hasGlobalName` or the 2-argument or 3-argument
65-
* `hasQualifiedName` predicates. To get the exact same results as this
66-
* predicate in all edge cases, use `getQualifiedName()`.
67-
*
68-
* Holds if this declaration has the fully-qualified name `qualifiedName`.
69-
* See `getQualifiedName`.
70-
*/
71-
deprecated predicate hasQualifiedName(string qualifiedName) {
72-
this.getQualifiedName() = qualifiedName
73-
}
74-
7563
/**
7664
* Holds if this declaration has a fully-qualified name with a name-space
7765
* component of `namespaceQualifier`, a declaring type of `typeQualifier`,
@@ -185,9 +173,6 @@ class Declaration extends Locatable, @declaration {
185173
/** Holds if the declaration has a definition. */
186174
predicate hasDefinition() { exists(this.getDefinition()) }
187175

188-
/** DEPRECATED: Use `hasDefinition` instead. */
189-
deprecated predicate isDefined() { this.hasDefinition() }
190-
191176
/** Gets the preferred location of this declaration, if any. */
192177
override Location getLocation() { none() }
193178

cpp/ql/lib/semmle/code/cpp/Function.qll

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -30,46 +30,6 @@ class Function extends Declaration, ControlFlowNode, AccessHolder, @function {
3030

3131
override string getName() { functions(underlyingElement(this), result, _) }
3232

33-
/**
34-
* DEPRECATED: Use `getIdentityString(Declaration)` from `semmle.code.cpp.Print` instead.
35-
* Gets the full signature of this function, including return type, parameter
36-
* types, and template arguments.
37-
*
38-
* For example, in the following code:
39-
* ```
40-
* template<typename T> T min(T x, T y);
41-
* int z = min(5, 7);
42-
* ```
43-
* The full signature of the function called on the last line would be
44-
* `min<int>(int, int) -> int`, and the full signature of the uninstantiated
45-
* template on the first line would be `min<T>(T, T) -> T`.
46-
*/
47-
deprecated string getFullSignature() {
48-
exists(string name, string templateArgs, string args |
49-
result = name + templateArgs + args + " -> " + this.getType().toString() and
50-
name = this.getQualifiedName() and
51-
(
52-
if exists(this.getATemplateArgument())
53-
then
54-
templateArgs =
55-
"<" +
56-
concat(int i |
57-
exists(this.getTemplateArgument(i))
58-
|
59-
this.getTemplateArgument(i).toString(), ", " order by i
60-
) + ">"
61-
else templateArgs = ""
62-
) and
63-
args =
64-
"(" +
65-
concat(int i |
66-
exists(this.getParameter(i))
67-
|
68-
this.getParameter(i).getType().toString(), ", " order by i
69-
) + ")"
70-
)
71-
}
72-
7333
/** Gets a specifier of this function. */
7434
override Specifier getASpecifier() {
7535
funspecifiers(underlyingElement(this), unresolveElement(result)) or

cpp/ql/lib/semmle/code/cpp/PrintAST.qll

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,6 @@ abstract class BaseAstNode extends PrintAstNode {
286286
* Gets the AST represented by this node.
287287
*/
288288
final Locatable getAst() { result = ast }
289-
290-
/** DEPRECATED: Alias for getAst */
291-
deprecated Locatable getAST() { result = this.getAst() }
292289
}
293290

294291
/**

cpp/ql/lib/semmle/code/cpp/commons/Alloc.qll

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,6 @@ import semmle.code.cpp.models.interfaces.Deallocation
77
*/
88
predicate freeFunction(Function f, int argNum) { argNum = f.(DeallocationFunction).getFreedArg() }
99

10-
/**
11-
* A call to a library routine that frees memory.
12-
*
13-
* DEPRECATED: Use `DeallocationExpr` instead (this also includes `delete` expressions).
14-
*/
15-
deprecated predicate freeCall(FunctionCall fc, Expr arg) {
16-
arg = fc.(DeallocationExpr).getFreedExpr()
17-
}
18-
1910
/**
2011
* Is e some kind of allocation or deallocation (`new`, `alloc`, `realloc`, `delete`, `free` etc)?
2112
*/

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string {
168168
*/
169169
predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) }
170170

171-
/**
172-
* DEPRECATED: Use `FlowExploration<explorationLimit>` instead.
173-
*
174-
* Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev`
175-
* measured in approximate number of interprocedural steps.
176-
*/
177-
deprecated int explorationLimit() { none() }
178-
179171
/**
180172
* Holds if hidden nodes should be included in the data flow graph.
181173
*

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string {
168168
*/
169169
predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) }
170170

171-
/**
172-
* DEPRECATED: Use `FlowExploration<explorationLimit>` instead.
173-
*
174-
* Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev`
175-
* measured in approximate number of interprocedural steps.
176-
*/
177-
deprecated int explorationLimit() { none() }
178-
179171
/**
180172
* Holds if hidden nodes should be included in the data flow graph.
181173
*

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string {
168168
*/
169169
predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) }
170170

171-
/**
172-
* DEPRECATED: Use `FlowExploration<explorationLimit>` instead.
173-
*
174-
* Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev`
175-
* measured in approximate number of interprocedural steps.
176-
*/
177-
deprecated int explorationLimit() { none() }
178-
179171
/**
180172
* Holds if hidden nodes should be included in the data flow graph.
181173
*

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string {
168168
*/
169169
predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) }
170170

171-
/**
172-
* DEPRECATED: Use `FlowExploration<explorationLimit>` instead.
173-
*
174-
* Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev`
175-
* measured in approximate number of interprocedural steps.
176-
*/
177-
deprecated int explorationLimit() { none() }
178-
179171
/**
180172
* Holds if hidden nodes should be included in the data flow graph.
181173
*

0 commit comments

Comments
 (0)