Skip to content

Commit f0755bf

Browse files
authored
Merge pull request github#18601 from erik-krogh/del-deps-jan-2025
All: delete outdated deprecations
2 parents 6337f5a + c7fc164 commit f0755bf

File tree

63 files changed

+66
-3445
lines changed

Some content is hidden

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

63 files changed

+66
-3445
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: breaking
3+
---
4+
* Deleted the deprecated `getAllocatorCall` predicate from `DeleteOrDeleteArrayExpr`, use `getDeallocatorCall` instead.

cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,11 +1110,6 @@ class DeleteOrDeleteArrayExpr extends Expr, TDeleteOrDeleteArrayExpr {
11101110
expr_deallocator(underlyingElement(this), unresolveElement(result), _)
11111111
}
11121112

1113-
/**
1114-
* DEPRECATED: use `getDeallocatorCall` instead.
1115-
*/
1116-
deprecated FunctionCall getAllocatorCall() { result = this.getChild(0) }
1117-
11181113
/**
11191114
* Gets the call to a non-default `operator delete`/`delete[]` that deallocates storage, if any.
11201115
*
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
category: breaking
3+
---
4+
* Deleted the deprecated `getInstanceType` predicate from the `UnboundGenericType` class.
5+
* Deleted the deprecated `getElement` predicate from the `Node` class in `ControlFlowGraph.qll`, use `getAstNode` instead.

csharp/ql/lib/semmle/code/csharp/Generics.qll

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -143,18 +143,6 @@ class UnboundGenericType extends ValueOrRefType, UnboundGeneric {
143143
result = UnboundGeneric.super.getAConstructedGeneric()
144144
}
145145

146-
/**
147-
* DEPRECATED: predicate does not contain any tuples.
148-
*
149-
* Gets the instance type of this type. For an unbound generic type, the instance type
150-
* is a constructed type created from the unbound type, with each of the supplied type
151-
* arguments being the corresponding type parameter.
152-
*/
153-
deprecated ConstructedType getInstanceType() {
154-
result = this.getAConstructedGeneric() and
155-
forall(TypeParameter tp, int i | tp = this.getTypeParameter(i) | tp = result.getTypeArgument(i))
156-
}
157-
158146
override Location getALocation() { type_location(this, result) }
159147

160148
override UnboundGenericType getUnboundDeclaration() {
@@ -312,10 +300,6 @@ class TypeParameterConstraints extends Element, @type_parameter_constraints {
312300
* ```
313301
*/
314302
class UnboundGenericStruct extends Struct, UnboundGenericType {
315-
deprecated override ConstructedStruct getInstanceType() {
316-
result = UnboundGenericType.super.getInstanceType()
317-
}
318-
319303
override ConstructedStruct getAConstructedGeneric() {
320304
result = UnboundGenericType.super.getAConstructedGeneric()
321305
}
@@ -335,10 +319,6 @@ class UnboundGenericStruct extends Struct, UnboundGenericType {
335319
* ```
336320
*/
337321
class UnboundGenericClass extends Class, UnboundGenericType {
338-
deprecated override ConstructedClass getInstanceType() {
339-
result = UnboundGenericType.super.getInstanceType()
340-
}
341-
342322
override ConstructedClass getAConstructedGeneric() {
343323
result = UnboundGenericType.super.getAConstructedGeneric()
344324
}
@@ -358,10 +338,6 @@ class UnboundGenericClass extends Class, UnboundGenericType {
358338
* ```
359339
*/
360340
class UnboundGenericInterface extends Interface, UnboundGenericType {
361-
deprecated override ConstructedInterface getInstanceType() {
362-
result = UnboundGenericType.super.getInstanceType()
363-
}
364-
365341
override ConstructedInterface getAConstructedGeneric() {
366342
result = UnboundGenericType.super.getAConstructedGeneric()
367343
}
@@ -382,10 +358,6 @@ class UnboundGenericInterface extends Interface, UnboundGenericType {
382358
* ```
383359
*/
384360
class UnboundGenericDelegateType extends DelegateType, UnboundGenericType {
385-
deprecated override ConstructedDelegateType getInstanceType() {
386-
result = UnboundGenericType.super.getInstanceType()
387-
}
388-
389361
override ConstructedDelegateType getAConstructedGeneric() {
390362
result = UnboundGenericType.super.getAConstructedGeneric()
391363
}

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ module ControlFlow {
2929
/** Gets the control flow element that this node corresponds to, if any. */
3030
final ControlFlowElement getAstNode() { result = super.getAstNode() }
3131

32-
/**
33-
* DEPRECATED: Use `getAstNode` instead.
34-
*
35-
* Gets the control flow element that this node corresponds to, if any.
36-
*/
37-
deprecated ControlFlowElement getElement() { result = this.getAstNode() }
38-
3932
/** Gets the basic block that this control flow node belongs to. */
4033
BasicBlock getBasicBlock() { result.getANode() = this }
4134

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: breaking
3+
---
4+
* Deleted the deprecated `describeBitSize` predicate from `IncorrectIntegerConversionLib.qll`

go/ql/lib/semmle/go/security/IncorrectIntegerConversionLib.qll

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -448,20 +448,6 @@ private module ConversionWithoutBoundsCheckConfig implements DataFlow::StateConf
448448
*/
449449
module Flow = DataFlow::GlobalWithState<ConversionWithoutBoundsCheckConfig>;
450450

451-
/** Gets a string describing the size of the integer parsed. */
452-
deprecated string describeBitSize(int bitSize, int intTypeBitSize) {
453-
intTypeBitSize in [0, 32, 64] and
454-
if bitSize != 0
455-
then bitSize in [8, 16, 32, 64] and result = "a " + bitSize + "-bit integer"
456-
else
457-
if intTypeBitSize = 0
458-
then result = "an integer with architecture-dependent bit size"
459-
else
460-
result =
461-
"a number with architecture-dependent bit-width, which is constrained to be " +
462-
intTypeBitSize + "-bit by build constraints,"
463-
}
464-
465451
/** Gets a string describing the size of the integer parsed. */
466452
string describeBitSize2(DataFlow::Node source) {
467453
exists(int sourceBitSize, int intTypeBitSize, boolean isSigned, string signedString |
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 the deprecated `isLValue` and `isRValue` predicates from the `VarAccess` class, use `isVarWrite` and `isVarRead` respectively instead.
5+
* Deleted the deprecated `getRhs` predicate from the `VarWrite` class, use `getASource` instead.
6+
* Deleted the deprecated `LValue` and `RValue` classes, use `VarWrite` and `VarRead` respectively instead.
7+
* Deleted a lot of deprecated classes ending in "*Access", use the corresponding "*Call" classes instead.
8+
* Deleted a lot of deprecated predicates ending in "*Access", use the corresponding "*Call" predicates instead.
9+
* Deleted the deprecated `EnvInput` and `DatabaseInput` classes from `FlowSources.qll`, use the threat models feature instead.
10+
* Deleted some deprecated API predicates from `SensitiveApi.qll`, use the Sink classes from that file instead.
11+

java/ql/lib/semmle/code/java/Expr.qll

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,9 +1924,6 @@ class VarAccess extends Expr, @varaccess {
19241924
exists(UnaryAssignExpr e | e.getExpr() = this)
19251925
}
19261926

1927-
/** DEPRECATED: Alias for `isVarWrite`. */
1928-
deprecated predicate isLValue() { this.isVarWrite() }
1929-
19301927
/**
19311928
* Holds if this variable access is a read access.
19321929
*
@@ -1936,9 +1933,6 @@ class VarAccess extends Expr, @varaccess {
19361933
*/
19371934
predicate isVarRead() { not exists(AssignExpr a | a.getDest() = this) }
19381935

1939-
/** DEPRECATED: Alias for `isVarRead`. */
1940-
deprecated predicate isRValue() { this.isVarRead() }
1941-
19421936
/** Gets a printable representation of this expression. */
19431937
override string toString() {
19441938
exists(Expr q | q = this.getQualifier() |
@@ -2002,14 +1996,8 @@ class VarWrite extends VarAccess {
20021996
* are source expressions of the assignment.
20031997
*/
20041998
Expr getASource() { exists(Assignment e | e.getDest() = this and e.getSource() = result) }
2005-
2006-
/** DEPRECATED: (Inaccurately-named) alias for `getASource` */
2007-
deprecated Expr getRhs() { result = this.getASource() }
20081999
}
20092000

2010-
/** DEPRECATED: Alias for `VarWrite`. */
2011-
deprecated class LValue = VarWrite;
2012-
20132001
/**
20142002
* A read access to a variable.
20152003
*
@@ -2021,9 +2009,6 @@ class VarRead extends VarAccess {
20212009
VarRead() { this.isVarRead() }
20222010
}
20232011

2024-
/** DEPRECATED: Alias for `VarRead`. */
2025-
deprecated class RValue = VarRead;
2026-
20272012
/** A method call is an invocation of a method with a list of arguments. */
20282013
class MethodCall extends Expr, Call, @methodaccess {
20292014
/** Gets the qualifying expression of this method access, if any. */
@@ -2082,25 +2067,16 @@ class MethodCall extends Expr, Call, @methodaccess {
20822067
*/
20832068
predicate isOwnMethodCall() { Qualifier::ownMemberAccess(this) }
20842069

2085-
/** DEPRECATED: Alias for `isOwnMethodCall`. */
2086-
deprecated predicate isOwnMethodAccess() { this.isOwnMethodCall() }
2087-
20882070
/**
20892071
* Holds if this is a method call to an instance method of the enclosing
20902072
* class `t`. That is, the qualifier is either an explicit or implicit
20912073
* `t`-qualified `this` or `super`.
20922074
*/
20932075
predicate isEnclosingMethodCall(RefType t) { Qualifier::enclosingMemberAccess(this, t) }
20942076

2095-
/** DEPRECATED: Alias for `isEnclosingMethodCall`. */
2096-
deprecated predicate isEnclosingMethodAccess(RefType t) { this.isEnclosingMethodCall(t) }
2097-
20982077
override string getAPrimaryQlClass() { result = "MethodCall" }
20992078
}
21002079

2101-
/** DEPRECATED: Alias for `MethodCall`. */
2102-
deprecated class MethodAccess = MethodCall;
2103-
21042080
/** A type access is a (possibly qualified) reference to a type. */
21052081
class TypeAccess extends Expr, Annotatable, @typeaccess {
21062082
/** Gets the qualifier of this type access, if any. */
@@ -2275,25 +2251,16 @@ class VirtualMethodCall extends MethodCall {
22752251
}
22762252
}
22772253

2278-
/** DEPRECATED: Alias for `VirtualMethodCall`. */
2279-
deprecated class VirtualMethodAccess = VirtualMethodCall;
2280-
22812254
/** A static method call. */
22822255
class StaticMethodCall extends MethodCall {
22832256
StaticMethodCall() { this.getMethod().isStatic() }
22842257
}
22852258

2286-
/** DEPRECATED: Alias for `StaticMethodCall`. */
2287-
deprecated class StaticMethodAccess = StaticMethodCall;
2288-
22892259
/** A call to a method in the superclass. */
22902260
class SuperMethodCall extends MethodCall {
22912261
SuperMethodCall() { this.getQualifier() instanceof SuperAccess }
22922262
}
22932263

2294-
/** DEPRECATED: Alias for `SuperMethodCall`. */
2295-
deprecated class SuperMethodAccess = SuperMethodCall;
2296-
22972264
/**
22982265
* A constructor call, which occurs either as a constructor invocation inside a
22992266
* constructor, or as part of a class instance expression.

java/ql/lib/semmle/code/java/JDK.qll

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,6 @@ class MethodCallSystemGetProperty extends MethodCall {
250250
}
251251
}
252252

253-
/** DEPRECATED: Alias for `MethodCallSystemGetProperty`. */
254-
deprecated class MethodAccessSystemGetProperty = MethodCallSystemGetProperty;
255-
256253
/**
257254
* Any method named `exit` on class `java.lang.Runtime` or `java.lang.System`.
258255
*/

0 commit comments

Comments
 (0)