Skip to content

Commit 6ba7f9a

Browse files
authored
Merge pull request #13352 from erik-krogh/once-again-deps-not-py-cpp
delete old deprecations
2 parents 46b3045 + ac9ede4 commit 6ba7f9a

File tree

109 files changed

+35
-1124
lines changed

Some content is hidden

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

109 files changed

+35
-1124
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/Instruction.qll

-6
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,6 @@ class Instruction extends Construction::TStageInstruction {
210210
*/
211211
final Language::AST getAst() { result = Construction::getInstructionAst(this) }
212212

213-
/** DEPRECATED: Alias for getAst */
214-
deprecated Language::AST getAST() { result = this.getAst() }
215-
216213
/**
217214
* Gets the location of the source code for this instruction.
218215
*/
@@ -463,9 +460,6 @@ class VariableInstruction extends Instruction {
463460
* Gets the AST variable that this instruction's IR variable refers to, if one exists.
464461
*/
465462
final Language::Variable getAstVariable() { result = var.(IRUserVariable).getVariable() }
466-
467-
/** DEPRECATED: Alias for getAstVariable */
468-
deprecated Language::Variable getASTVariable() { result = this.getAstVariable() }
469463
}
470464

471465
/**

cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll

-12
Original file line numberDiff line numberDiff line change
@@ -422,12 +422,6 @@ private module Cached {
422422
)
423423
}
424424

425-
/** DEPRECATED: Alias for getInstructionAst */
426-
cached
427-
deprecated Language::AST getInstructionAST(Instruction instr) {
428-
result = getInstructionAst(instr)
429-
}
430-
431425
cached
432426
Language::LanguageType getInstructionResultType(Instruction instr) {
433427
result = instr.(RawIR::Instruction).getResultLanguageType()
@@ -993,9 +987,6 @@ predicate canReuseSsaForMemoryResult(Instruction instruction) {
993987
// We don't support reusing SSA for any location that could create a `Chi` instruction.
994988
}
995989

996-
/** DEPRECATED: Alias for canReuseSsaForMemoryResult */
997-
deprecated predicate canReuseSSAForMemoryResult = canReuseSsaForMemoryResult/1;
998-
999990
/**
1000991
* Expose some of the internal predicates to PrintSSA.qll. We do this by publicly importing those modules in the
1001992
* `DebugSsa` module, which is then imported by PrintSSA.
@@ -1005,9 +996,6 @@ module DebugSsa {
1005996
import DefUse
1006997
}
1007998

1008-
/** DEPRECATED: Alias for DebugSsa */
1009-
deprecated module DebugSSA = DebugSsa;
1010-
1011999
import CachedForDebugging
10121000

10131001
cached

cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/TInstruction.qll

-6
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ module UnaliasedSsaInstructions {
7373
}
7474
}
7575

76-
/** DEPRECATED: Alias for UnaliasedSsaInstructions */
77-
deprecated module UnaliasedSSAInstructions = UnaliasedSsaInstructions;
78-
7976
/**
8077
* Provides wrappers for the constructors of each branch of `TInstruction` that is used by the
8178
* aliased SSA stage.
@@ -107,6 +104,3 @@ module AliasedSsaInstructions {
107104
result = TAliasedSsaUnreachedInstruction(irFunc)
108105
}
109106
}
110-
111-
/** DEPRECATED: Alias for AliasedSsaInstructions */
112-
deprecated module AliasedSSAInstructions = AliasedSsaInstructions;

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/Instruction.qll

-6
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,6 @@ class Instruction extends Construction::TStageInstruction {
210210
*/
211211
final Language::AST getAst() { result = Construction::getInstructionAst(this) }
212212

213-
/** DEPRECATED: Alias for getAst */
214-
deprecated Language::AST getAST() { result = this.getAst() }
215-
216213
/**
217214
* Gets the location of the source code for this instruction.
218215
*/
@@ -463,9 +460,6 @@ class VariableInstruction extends Instruction {
463460
* Gets the AST variable that this instruction's IR variable refers to, if one exists.
464461
*/
465462
final Language::Variable getAstVariable() { result = var.(IRUserVariable).getVariable() }
466-
467-
/** DEPRECATED: Alias for getAstVariable */
468-
deprecated Language::Variable getASTVariable() { result = this.getAstVariable() }
469463
}
470464

471465
/**

cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/Instruction.qll

-6
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,6 @@ class Instruction extends Construction::TStageInstruction {
210210
*/
211211
final Language::AST getAst() { result = Construction::getInstructionAst(this) }
212212

213-
/** DEPRECATED: Alias for getAst */
214-
deprecated Language::AST getAST() { result = this.getAst() }
215-
216213
/**
217214
* Gets the location of the source code for this instruction.
218215
*/
@@ -463,9 +460,6 @@ class VariableInstruction extends Instruction {
463460
* Gets the AST variable that this instruction's IR variable refers to, if one exists.
464461
*/
465462
final Language::Variable getAstVariable() { result = var.(IRUserVariable).getVariable() }
466-
467-
/** DEPRECATED: Alias for getAstVariable */
468-
deprecated Language::Variable getASTVariable() { result = this.getAstVariable() }
469463
}
470464

471465
/**

cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll

-12
Original file line numberDiff line numberDiff line change
@@ -422,12 +422,6 @@ private module Cached {
422422
)
423423
}
424424

425-
/** DEPRECATED: Alias for getInstructionAst */
426-
cached
427-
deprecated Language::AST getInstructionAST(Instruction instr) {
428-
result = getInstructionAst(instr)
429-
}
430-
431425
cached
432426
Language::LanguageType getInstructionResultType(Instruction instr) {
433427
result = instr.(RawIR::Instruction).getResultLanguageType()
@@ -993,9 +987,6 @@ predicate canReuseSsaForMemoryResult(Instruction instruction) {
993987
// We don't support reusing SSA for any location that could create a `Chi` instruction.
994988
}
995989

996-
/** DEPRECATED: Alias for canReuseSsaForMemoryResult */
997-
deprecated predicate canReuseSSAForMemoryResult = canReuseSsaForMemoryResult/1;
998-
999990
/**
1000991
* Expose some of the internal predicates to PrintSSA.qll. We do this by publicly importing those modules in the
1001992
* `DebugSsa` module, which is then imported by PrintSSA.
@@ -1005,9 +996,6 @@ module DebugSsa {
1005996
import DefUse
1006997
}
1007998

1008-
/** DEPRECATED: Alias for DebugSsa */
1009-
deprecated module DebugSSA = DebugSsa;
1010-
1011999
import CachedForDebugging
10121000

10131001
cached

cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll

-6
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ predicate canReuseSsaForVariable(IRAutomaticVariable var) {
4646
not allocationEscapes(var)
4747
}
4848

49-
/** DEPRECATED: Alias for canReuseSsaForVariable */
50-
deprecated predicate canReuseSSAForVariable = canReuseSsaForVariable/1;
51-
5249
private newtype TMemoryLocation = MkMemoryLocation(Allocation var) { isVariableModeled(var) }
5350

5451
private MemoryLocation getMemoryLocation(Allocation var) { result.getAllocation() = var }
@@ -80,9 +77,6 @@ class MemoryLocation extends TMemoryLocation {
8077

8178
predicate canReuseSsaForOldResult(Instruction instr) { none() }
8279

83-
/** DEPRECATED: Alias for canReuseSsaForOldResult */
84-
deprecated predicate canReuseSSAForOldResult = canReuseSsaForOldResult/1;
85-
8680
/**
8781
* Represents a set of `MemoryLocation`s that cannot overlap with
8882
* `MemoryLocation`s outside of the set. The `VirtualVariable` will be
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* Deleted the deprecated `WebConfigXML`, `ConfigurationXMLElement`, `LocationXMLElement`, `SystemWebXMLElement`, `SystemWebServerXMLElement`, `CustomErrorsXMLElement`, and `HttpRuntimeXMLElement` classes from `WebConfig.qll`. The non-deprecated names with PascalCased Xml suffixes should be used instead.
5+
* Deleted the deprecated `Record` class from both `Types.qll` and `Type.qll`.
6+
* Deleted the deprecated `StructuralComparisonConfiguration` class from `StructuralComparison.qll`, use `sameGvn` instead.
7+
* Deleted the deprecated `isParameterOf` predicate from the `ParameterNode` class.
8+
* Deleted the deprecated `SafeExternalAPICallable`, `ExternalAPIDataNode`, `UntrustedDataToExternalAPIConfig`, `UntrustedExternalAPIDataNode`, and `ExternalAPIUsedWithUntrustedData` classes from `ExternalAPIsQuery.qll`. The non-deprecated names with PascalCased Api suffixes should be used instead.

csharp/ql/lib/semmle/code/asp/WebConfig.qll

-21
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ class WebConfigReleaseTransformXml extends XmlFile {
1818
WebConfigReleaseTransformXml() { this.getName().matches("%Web.Release.config") }
1919
}
2020

21-
/** DEPRECATED: Alias for WebConfigXml */
22-
deprecated class WebConfigXML = WebConfigXml;
23-
2421
/** A `<configuration>` tag in an ASP.NET configuration file. */
2522
class ConfigurationXmlElement extends XmlElement {
2623
ConfigurationXmlElement() { this.getName().toLowerCase() = "configuration" }
@@ -31,9 +28,6 @@ class CompilationXmlElement extends XmlElement {
3128
CompilationXmlElement() { this.getName().toLowerCase() = "compilation" }
3229
}
3330

34-
/** DEPRECATED: Alias for ConfigurationXmlElement */
35-
deprecated class ConfigurationXMLElement = ConfigurationXmlElement;
36-
3731
/** A `<location>` tag in an ASP.NET configuration file. */
3832
class LocationXmlElement extends XmlElement {
3933
LocationXmlElement() {
@@ -42,9 +36,6 @@ class LocationXmlElement extends XmlElement {
4236
}
4337
}
4438

45-
/** DEPRECATED: Alias for LocationXmlElement */
46-
deprecated class LocationXMLElement = LocationXmlElement;
47-
4839
/** A `<system.web>` tag in an ASP.NET configuration file. */
4940
class SystemWebXmlElement extends XmlElement {
5041
SystemWebXmlElement() {
@@ -57,9 +48,6 @@ class SystemWebXmlElement extends XmlElement {
5748
}
5849
}
5950

60-
/** DEPRECATED: Alias for SystemWebXmlElement */
61-
deprecated class SystemWebXMLElement = SystemWebXmlElement;
62-
6351
/** A `<system.webServer>` tag in an ASP.NET configuration file. */
6452
class SystemWebServerXmlElement extends XmlElement {
6553
SystemWebServerXmlElement() {
@@ -72,9 +60,6 @@ class SystemWebServerXmlElement extends XmlElement {
7260
}
7361
}
7462

75-
/** DEPRECATED: Alias for SystemWebServerXmlElement */
76-
deprecated class SystemWebServerXMLElement = SystemWebServerXmlElement;
77-
7863
/** A `<customErrors>` tag in an ASP.NET configuration file. */
7964
class CustomErrorsXmlElement extends XmlElement {
8065
CustomErrorsXmlElement() {
@@ -83,9 +68,6 @@ class CustomErrorsXmlElement extends XmlElement {
8368
}
8469
}
8570

86-
/** DEPRECATED: Alias for CustomErrorsXmlElement */
87-
deprecated class CustomErrorsXMLElement = CustomErrorsXmlElement;
88-
8971
/** A `<httpRuntime>` tag in an ASP.NET configuration file. */
9072
class HttpRuntimeXmlElement extends XmlElement {
9173
HttpRuntimeXmlElement() {
@@ -94,9 +76,6 @@ class HttpRuntimeXmlElement extends XmlElement {
9476
}
9577
}
9678

97-
/** DEPRECATED: Alias for HttpRuntimeXmlElement */
98-
deprecated class HttpRuntimeXMLElement = HttpRuntimeXmlElement;
99-
10079
/** A `<forms>` tag under `<system.web><authentication>` in an ASP.NET configuration file. */
10180
class FormsElement extends XmlElement {
10281
FormsElement() {

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

-5
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,6 @@ class Class extends ValueOrRefType {
6060
Class() { this.isClass() }
6161
}
6262

63-
/** A `record`. */
64-
deprecated class Record extends Class {
65-
Record() { this.isRecord() }
66-
}
67-
6863
/** An `interface`. */
6964
class Interface extends ValueOrRefType {
7065
Interface() { this.isInterface() }

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

-10
Original file line numberDiff line numberDiff line change
@@ -780,16 +780,6 @@ class Class extends RefType, @class_type {
780780
override string getAPrimaryQlClass() { result = "Class" }
781781
}
782782

783-
/**
784-
* DEPRECATED: Use `RecordClass` instead.
785-
*/
786-
deprecated class Record extends Class {
787-
Record() { this.isRecord() }
788-
789-
/** Gets the clone method of this record. */
790-
RecordCloneMethod getCloneMethod() { result = this.getAMember() }
791-
}
792-
793783
/**
794784
* A `record`, for example
795785
*

csharp/ql/lib/semmle/code/csharp/commons/StructuralComparison.qll

-42
Original file line numberDiff line numberDiff line change
@@ -200,45 +200,3 @@ predicate sameGvn(ControlFlowElement x, ControlFlowElement y) {
200200
pragma[only_bind_into](toGvn(pragma[only_bind_out](x))) =
201201
pragma[only_bind_into](toGvn(pragma[only_bind_out](y)))
202202
}
203-
204-
/**
205-
* DEPRECATED: Use `sameGvn` instead.
206-
*
207-
* A configuration for performing structural comparisons of program elements
208-
* (expressions and statements).
209-
*
210-
* The predicate `candidate()` must be overridden, in order to identify the
211-
* elements for which to perform structural comparison.
212-
*
213-
* Each use of the library is identified by a unique string value.
214-
*/
215-
abstract deprecated class StructuralComparisonConfiguration extends string {
216-
bindingset[this]
217-
StructuralComparisonConfiguration() { any() }
218-
219-
/**
220-
* Holds if elements `x` and `y` are candidates for testing structural
221-
* equality.
222-
*
223-
* Subclasses are expected to override this predicate to identify the
224-
* top-level elements which they want to compare. Care should be
225-
* taken to avoid identifying too many pairs of elements, as in general
226-
* there are very many structurally equal subtrees in a program, and
227-
* in order to keep the computation feasible we must focus attention.
228-
*
229-
* Note that this relation is not expected to be symmetric -- it's
230-
* fine to include a pair `(x, y)` but not `(y, x)`.
231-
* In fact, not including the symmetrically implied fact will save
232-
* half the computation time on the structural comparison.
233-
*/
234-
abstract predicate candidate(ControlFlowElement x, ControlFlowElement y);
235-
236-
/**
237-
* Holds if elements `x` and `y` structurally equal. `x` and `y` must be
238-
* flagged as candidates for structural equality, that is,
239-
* `candidate(x, y)` must hold.
240-
*/
241-
predicate same(ControlFlowElement x, ControlFlowElement y) {
242-
this.candidate(x, y) and sameGvn(x, y)
243-
}
244-
}

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

-10
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,6 @@ class ParameterNode extends Node instanceof ParameterNodeImpl {
106106
result = c.asCallable().getParameter(ppos.getPosition())
107107
)
108108
}
109-
110-
/**
111-
* DEPRECATED
112-
*
113-
* Holds if this node is the parameter of callable `c` at the specified
114-
* (zero-based) position.
115-
*/
116-
deprecated predicate isParameterOf(DataFlowCallable c, int i) {
117-
super.isParameterOf(c, any(ParameterPosition pos | i = pos.getPosition()))
118-
}
119109
}
120110

121111
/** A definition, viewed as a node in a data flow graph. */

csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll

-15
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ private import semmle.code.csharp.dataflow.FlowSummary
1414
*/
1515
abstract class SafeExternalApiCallable extends Callable { }
1616

17-
/** DEPRECATED: Alias for SafeExternalApiCallable */
18-
deprecated class SafeExternalAPICallable = SafeExternalApiCallable;
19-
2017
private class SummarizedCallableSafe extends SafeExternalApiCallable instanceof SummarizedCallable {
2118
}
2219

@@ -87,9 +84,6 @@ class ExternalApiDataNode extends DataFlow::Node {
8784
}
8885
}
8986

90-
/** DEPRECATED: Alias for ExternalApiDataNode */
91-
deprecated class ExternalAPIDataNode = ExternalApiDataNode;
92-
9387
/**
9488
* DEPRECATED: Use `RemoteSourceToExternalApi` instead.
9589
*
@@ -113,9 +107,6 @@ private module RemoteSourceToExternalApiConfig implements DataFlow::ConfigSig {
113107
/** A module for tracking flow from `RemoteFlowSource`s to `ExternalApiDataNode`s. */
114108
module RemoteSourceToExternalApi = TaintTracking::Global<RemoteSourceToExternalApiConfig>;
115109

116-
/** DEPRECATED: Alias for UntrustedDataToExternalApiConfig */
117-
deprecated class UntrustedDataToExternalAPIConfig = UntrustedDataToExternalApiConfig;
118-
119110
/** A node representing untrusted data being passed to an external API. */
120111
class UntrustedExternalApiDataNode extends ExternalApiDataNode {
121112
UntrustedExternalApiDataNode() { RemoteSourceToExternalApi::flow(_, this) }
@@ -124,9 +115,6 @@ class UntrustedExternalApiDataNode extends ExternalApiDataNode {
124115
DataFlow::Node getAnUntrustedSource() { RemoteSourceToExternalApi::flow(result, this) }
125116
}
126117

127-
/** DEPRECATED: Alias for UntrustedExternalApiDataNode */
128-
deprecated class UntrustedExternalAPIDataNode = UntrustedExternalApiDataNode;
129-
130118
/** An external API which is used with untrusted data. */
131119
private newtype TExternalApi =
132120
/** An untrusted API method `m` where untrusted data is passed at `index`. */
@@ -161,6 +149,3 @@ class ExternalApiUsedWithUntrustedData extends TExternalApi {
161149
)
162150
}
163151
}
164-
165-
/** DEPRECATED: Alias for ExternalApiUsedWithUntrustedData */
166-
deprecated class ExternalAPIUsedWithUntrustedData = ExternalApiUsedWithUntrustedData;

csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll

-3
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,6 @@ class LdapEncodeSanitizer extends Sanitizer {
149149
}
150150
}
151151

152-
/** DEPRECATED: Alias for LdapEncodeSanitizer */
153-
deprecated class LDAPEncodeSanitizer = LdapEncodeSanitizer;
154-
155152
private class SimpleTypeSanitizer extends Sanitizer, SimpleTypeSanitizedExpr { }
156153

157154
private class GuidSanitizer extends Sanitizer, GuidSanitizedExpr { }

0 commit comments

Comments
 (0)