mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
delete old deprecations
This commit is contained in:
@@ -227,18 +227,6 @@ class Class extends UserType {
|
||||
result = this.accessOfBaseMember(member.getDeclaringType(), member.getASpecifier())
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: name changed to `hasImplicitCopyConstructor` to reflect that
|
||||
* `= default` members are no longer included.
|
||||
*/
|
||||
deprecated predicate hasGeneratedCopyConstructor() { this.hasImplicitCopyConstructor() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: name changed to `hasImplicitCopyAssignmentOperator` to
|
||||
* reflect that `= default` members are no longer included.
|
||||
*/
|
||||
deprecated predicate hasGeneratedCopyAssignmentOperator() { this.hasImplicitCopyConstructor() }
|
||||
|
||||
/**
|
||||
* Holds if this class, struct or union has an implicitly-declared copy
|
||||
* constructor that is not _deleted_. This predicate is more accurate than
|
||||
|
||||
@@ -108,20 +108,6 @@ class XmlFile extends XmlParent, File {
|
||||
/** Gets the name of this XML file. */
|
||||
override string getName() { result = File.super.getAbsolutePath() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getAbsolutePath()` instead.
|
||||
*
|
||||
* Gets the path of this XML file.
|
||||
*/
|
||||
deprecated string getPath() { result = this.getAbsolutePath() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getParentContainer().getAbsolutePath()` instead.
|
||||
*
|
||||
* Gets the path of the folder that contains this XML file.
|
||||
*/
|
||||
deprecated string getFolder() { result = this.getParentContainer().getAbsolutePath() }
|
||||
|
||||
/** Gets the encoding of this XML file. */
|
||||
string getEncoding() { xmlEncoding(this, result) }
|
||||
|
||||
|
||||
@@ -59,26 +59,6 @@ abstract class MutexType extends Type {
|
||||
* Gets a call that unlocks any mutex of this type.
|
||||
*/
|
||||
FunctionCall getUnlockAccess() { this.unlockAccess(result, _) }
|
||||
|
||||
/**
|
||||
* DEPRECATED: use mustlockAccess(fc, arg) instead.
|
||||
*/
|
||||
deprecated Function getMustlockFunction() { result = this.getMustlockAccess().getTarget() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: use trylockAccess(fc, arg) instead.
|
||||
*/
|
||||
deprecated Function getTrylockFunction() { result = this.getTrylockAccess().getTarget() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: use lockAccess(fc, arg) instead.
|
||||
*/
|
||||
deprecated Function getLockFunction() { result = this.getLockAccess().getTarget() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: use unlockAccess(fc, arg) instead.
|
||||
*/
|
||||
deprecated Function getUnlockFunction() { result = this.getUnlockAccess().getTarget() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -75,13 +75,6 @@ class SubBasicBlock extends ControlFlowNodeBase {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: use `getRankInBasicBlock` instead. Note that this predicate
|
||||
* returns a 0-based position, while `getRankInBasicBlock` returns a 1-based
|
||||
* position.
|
||||
*/
|
||||
deprecated int getPosInBasicBlock(BasicBlock bb) { result = this.getRankInBasicBlock(bb) - 1 }
|
||||
|
||||
pragma[noinline]
|
||||
private int getIndexInBasicBlock(BasicBlock bb) { this = bb.getNode(result) }
|
||||
|
||||
|
||||
@@ -75,13 +75,6 @@ class SubBasicBlock extends ControlFlowNodeBase {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: use `getRankInBasicBlock` instead. Note that this predicate
|
||||
* returns a 0-based position, while `getRankInBasicBlock` returns a 1-based
|
||||
* position.
|
||||
*/
|
||||
deprecated int getPosInBasicBlock(BasicBlock bb) { result = this.getRankInBasicBlock(bb) - 1 }
|
||||
|
||||
pragma[noinline]
|
||||
private int getIndexInBasicBlock(BasicBlock bb) { this = bb.getNode(result) }
|
||||
|
||||
|
||||
@@ -719,13 +719,6 @@ class ReferenceToExpr extends Conversion, @reference_to {
|
||||
class PointerDereferenceExpr extends UnaryOperation, @indirect {
|
||||
override string getAPrimaryQlClass() { result = "PointerDereferenceExpr" }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use getOperand() instead.
|
||||
*
|
||||
* Gets the expression that is being dereferenced.
|
||||
*/
|
||||
deprecated Expr getExpr() { result = this.getOperand() }
|
||||
|
||||
override string getOperator() { result = "*" }
|
||||
|
||||
override int getPrecedence() { result = 16 }
|
||||
|
||||
@@ -87,22 +87,6 @@ class Operand extends TStageOperand {
|
||||
this.getDefinitionOverlap() instanceof MustExactlyOverlap
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: renamed to `getUse`.
|
||||
*
|
||||
* Gets the `Instruction` that consumes this operand.
|
||||
*/
|
||||
deprecated final Instruction getUseInstruction() { result = this.getUse() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: use `getAnyDef` or `getDef`. The exact replacement for this
|
||||
* predicate is `getAnyDef`, but most uses of this predicate should probably
|
||||
* be replaced with `getDef`.
|
||||
*
|
||||
* Gets the `Instruction` whose result is the value of the operand.
|
||||
*/
|
||||
deprecated final Instruction getDefinitionInstruction() { result = this.getAnyDef() }
|
||||
|
||||
/**
|
||||
* Gets the overlap relationship between the operand's definition and its use.
|
||||
*/
|
||||
|
||||
@@ -87,22 +87,6 @@ class Operand extends TStageOperand {
|
||||
this.getDefinitionOverlap() instanceof MustExactlyOverlap
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: renamed to `getUse`.
|
||||
*
|
||||
* Gets the `Instruction` that consumes this operand.
|
||||
*/
|
||||
deprecated final Instruction getUseInstruction() { result = this.getUse() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: use `getAnyDef` or `getDef`. The exact replacement for this
|
||||
* predicate is `getAnyDef`, but most uses of this predicate should probably
|
||||
* be replaced with `getDef`.
|
||||
*
|
||||
* Gets the `Instruction` whose result is the value of the operand.
|
||||
*/
|
||||
deprecated final Instruction getDefinitionInstruction() { result = this.getAnyDef() }
|
||||
|
||||
/**
|
||||
* Gets the overlap relationship between the operand's definition and its use.
|
||||
*/
|
||||
|
||||
@@ -87,22 +87,6 @@ class Operand extends TStageOperand {
|
||||
this.getDefinitionOverlap() instanceof MustExactlyOverlap
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: renamed to `getUse`.
|
||||
*
|
||||
* Gets the `Instruction` that consumes this operand.
|
||||
*/
|
||||
deprecated final Instruction getUseInstruction() { result = this.getUse() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: use `getAnyDef` or `getDef`. The exact replacement for this
|
||||
* predicate is `getAnyDef`, but most uses of this predicate should probably
|
||||
* be replaced with `getDef`.
|
||||
*
|
||||
* Gets the `Instruction` whose result is the value of the operand.
|
||||
*/
|
||||
deprecated final Instruction getDefinitionInstruction() { result = this.getAnyDef() }
|
||||
|
||||
/**
|
||||
* Gets the overlap relationship between the operand's definition and its use.
|
||||
*/
|
||||
|
||||
@@ -40,12 +40,6 @@ class FunctionInput extends TFunctionInput {
|
||||
*/
|
||||
predicate isParameter(ParameterIndex index) { none() }
|
||||
|
||||
/**
|
||||
* Holds if this is the input value of the parameter with index `index`.
|
||||
* DEPRECATED: Use `isParameter(index)` instead.
|
||||
*/
|
||||
deprecated final predicate isInParameter(ParameterIndex index) { this.isParameter(index) }
|
||||
|
||||
/**
|
||||
* Holds if this is the input value pointed to (through `ind` number of indirections) by a
|
||||
* pointer parameter to a function, or the input value referred to by a reference parameter
|
||||
@@ -84,16 +78,6 @@ class FunctionInput extends TFunctionInput {
|
||||
*/
|
||||
predicate isParameterDeref(ParameterIndex index) { this.isParameterDeref(index, 1) }
|
||||
|
||||
/**
|
||||
* Holds if this is the input value pointed to by a pointer parameter to a function, or the input
|
||||
* value referred to by a reference parameter to a function, where the parameter has index
|
||||
* `index`.
|
||||
* DEPRECATED: Use `isParameterDeref(index)` instead.
|
||||
*/
|
||||
deprecated final predicate isInParameterPointer(ParameterIndex index) {
|
||||
this.isParameterDeref(index)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if this is the input value pointed to by the `this` pointer of an instance member
|
||||
* function.
|
||||
@@ -124,13 +108,6 @@ class FunctionInput extends TFunctionInput {
|
||||
*/
|
||||
predicate isQualifierObject() { this.isQualifierObject(1) }
|
||||
|
||||
/**
|
||||
* Holds if this is the input value pointed to by the `this` pointer of an instance member
|
||||
* function.
|
||||
* DEPRECATED: Use `isQualifierObject()` instead.
|
||||
*/
|
||||
deprecated final predicate isInQualifier() { this.isQualifierObject() }
|
||||
|
||||
/**
|
||||
* Holds if this is the input value of the `this` pointer of an instance member function.
|
||||
*
|
||||
@@ -396,16 +373,6 @@ class FunctionOutput extends TFunctionOutput {
|
||||
*/
|
||||
predicate isParameterDeref(ParameterIndex i, int ind) { ind = 1 and this.isParameterDeref(i) }
|
||||
|
||||
/**
|
||||
* Holds if this is the output value pointed to by a pointer parameter to a function, or the
|
||||
* output value referred to by a reference parameter to a function, where the parameter has
|
||||
* index `index`.
|
||||
* DEPRECATED: Use `isParameterDeref(index)` instead.
|
||||
*/
|
||||
deprecated final predicate isOutParameterPointer(ParameterIndex index) {
|
||||
this.isParameterDeref(index)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if this is the output value pointed to by the `this` pointer of an instance member
|
||||
* function.
|
||||
@@ -436,13 +403,6 @@ class FunctionOutput extends TFunctionOutput {
|
||||
*/
|
||||
predicate isQualifierObject(int ind) { ind = 1 and this.isQualifierObject() }
|
||||
|
||||
/**
|
||||
* Holds if this is the output value pointed to by the `this` pointer of an instance member
|
||||
* function.
|
||||
* DEPRECATED: Use `isQualifierObject()` instead.
|
||||
*/
|
||||
deprecated final predicate isOutQualifier() { this.isQualifierObject() }
|
||||
|
||||
/**
|
||||
* Holds if this is the value returned by a function.
|
||||
*
|
||||
@@ -462,12 +422,6 @@ class FunctionOutput extends TFunctionOutput {
|
||||
*/
|
||||
predicate isReturnValue() { none() }
|
||||
|
||||
/**
|
||||
* Holds if this is the value returned by a function.
|
||||
* DEPRECATED: Use `isReturnValue()` instead.
|
||||
*/
|
||||
deprecated final predicate isOutReturnValue() { this.isReturnValue() }
|
||||
|
||||
/**
|
||||
* Holds if this is the output value pointed to by the return value of a function, if the function
|
||||
* returns a pointer, or the output value referred to by the return value of a function, if the
|
||||
@@ -508,14 +462,6 @@ class FunctionOutput extends TFunctionOutput {
|
||||
*/
|
||||
predicate isReturnValueDeref(int ind) { ind = 1 and this.isReturnValueDeref() }
|
||||
|
||||
/**
|
||||
* Holds if this is the output value pointed to by the return value of a function, if the function
|
||||
* returns a pointer, or the output value referred to by the return value of a function, if the
|
||||
* function returns a reference.
|
||||
* DEPRECATED: Use `isReturnValueDeref()` instead.
|
||||
*/
|
||||
deprecated final predicate isOutReturnPointer() { this.isReturnValueDeref() }
|
||||
|
||||
/**
|
||||
* Holds if `i >= 0` and `isParameterDeref(i, ind)` holds for this is the value, or
|
||||
* if `i = -1` and `isQualifierObject(ind)` holds for this value.
|
||||
|
||||
@@ -96,15 +96,6 @@ class RangeSsaDefinition extends ControlFlowNodeBase {
|
||||
/** Whether this definition is a phi node for variable `v`. */
|
||||
predicate isPhiNode(StackVariable v) { exists(RangeSsa x | x.phi_node(v, this)) }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use isGuardPhi/4 instead
|
||||
* If this definition is a phi node corresponding to a guard,
|
||||
* then return the variable access and the guard.
|
||||
*/
|
||||
deprecated predicate isGuardPhi(VariableAccess va, Expr guard, boolean branch) {
|
||||
guard_defn(va, guard, this, branch)
|
||||
}
|
||||
|
||||
/**
|
||||
* If this definition is a phi node corresponding to a guard,
|
||||
* then return the variable guarded, the variable access and the guard.
|
||||
|
||||
@@ -108,20 +108,6 @@ class XmlFile extends XmlParent, File {
|
||||
/** Gets the name of this XML file. */
|
||||
override string getName() { result = File.super.getAbsolutePath() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getAbsolutePath()` instead.
|
||||
*
|
||||
* Gets the path of this XML file.
|
||||
*/
|
||||
deprecated string getPath() { result = this.getAbsolutePath() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getParentContainer().getAbsolutePath()` instead.
|
||||
*
|
||||
* Gets the path of the folder that contains this XML file.
|
||||
*/
|
||||
deprecated string getFolder() { result = this.getParentContainer().getAbsolutePath() }
|
||||
|
||||
/** Gets the encoding of this XML file. */
|
||||
string getEncoding() { xmlEncoding(this, result) }
|
||||
|
||||
|
||||
@@ -37,26 +37,6 @@ abstract class AssertMethod extends Method {
|
||||
/** Gets the index of a parameter being asserted. */
|
||||
abstract int getAnAssertionIndex();
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getAnAssertionIndex()` instead.
|
||||
*
|
||||
* Gets the index of a parameter being asserted.
|
||||
*/
|
||||
deprecated final int getAssertionIndex() { result = this.getAnAssertionIndex() }
|
||||
|
||||
/** Gets the parameter at position `i` being asserted. */
|
||||
final Parameter getAssertedParameter(int i) {
|
||||
result = this.getParameter(i) and
|
||||
i = this.getAnAssertionIndex()
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getAssertedParameter(_)` instead.
|
||||
*
|
||||
* Gets a parameter being asserted.
|
||||
*/
|
||||
deprecated final Parameter getAssertedParameter() { result = this.getAssertedParameter(_) }
|
||||
|
||||
/** Gets the failure type if the assertion fails for argument `i`, if any. */
|
||||
abstract AssertionFailure getAssertionFailure(int i);
|
||||
}
|
||||
|
||||
@@ -162,12 +162,6 @@ class OverridableCallable extends Callable, Overridable {
|
||||
}
|
||||
}
|
||||
|
||||
/** An overridable method. */
|
||||
deprecated class OverridableMethod extends Method, OverridableCallable { }
|
||||
|
||||
/** An overridable accessor. */
|
||||
deprecated class OverridableAccessor extends Accessor, OverridableCallable { }
|
||||
|
||||
/** An unbound type. */
|
||||
class UnboundDeclarationType extends Type {
|
||||
UnboundDeclarationType() { this.isUnboundDeclaration() }
|
||||
|
||||
@@ -87,22 +87,6 @@ class Operand extends TStageOperand {
|
||||
this.getDefinitionOverlap() instanceof MustExactlyOverlap
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: renamed to `getUse`.
|
||||
*
|
||||
* Gets the `Instruction` that consumes this operand.
|
||||
*/
|
||||
deprecated final Instruction getUseInstruction() { result = this.getUse() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: use `getAnyDef` or `getDef`. The exact replacement for this
|
||||
* predicate is `getAnyDef`, but most uses of this predicate should probably
|
||||
* be replaced with `getDef`.
|
||||
*
|
||||
* Gets the `Instruction` whose result is the value of the operand.
|
||||
*/
|
||||
deprecated final Instruction getDefinitionInstruction() { result = this.getAnyDef() }
|
||||
|
||||
/**
|
||||
* Gets the overlap relationship between the operand's definition and its use.
|
||||
*/
|
||||
|
||||
@@ -87,22 +87,6 @@ class Operand extends TStageOperand {
|
||||
this.getDefinitionOverlap() instanceof MustExactlyOverlap
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: renamed to `getUse`.
|
||||
*
|
||||
* Gets the `Instruction` that consumes this operand.
|
||||
*/
|
||||
deprecated final Instruction getUseInstruction() { result = this.getUse() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: use `getAnyDef` or `getDef`. The exact replacement for this
|
||||
* predicate is `getAnyDef`, but most uses of this predicate should probably
|
||||
* be replaced with `getDef`.
|
||||
*
|
||||
* Gets the `Instruction` whose result is the value of the operand.
|
||||
*/
|
||||
deprecated final Instruction getDefinitionInstruction() { result = this.getAnyDef() }
|
||||
|
||||
/**
|
||||
* Gets the overlap relationship between the operand's definition and its use.
|
||||
*/
|
||||
|
||||
@@ -32,12 +32,6 @@ module AliasModels {
|
||||
*/
|
||||
predicate isParameter(ParameterIndex index) { none() }
|
||||
|
||||
/**
|
||||
* Holds if this is the input value of the parameter with index `index`.
|
||||
* DEPRECATED: Use `isParameter(index)` instead.
|
||||
*/
|
||||
deprecated final predicate isInParameter(ParameterIndex index) { this.isParameter(index) }
|
||||
|
||||
/**
|
||||
* Holds if this is the input value pointed to by a pointer parameter to a function, or the input
|
||||
* value referred to by a reference parameter to a function, where the parameter has index
|
||||
@@ -71,13 +65,6 @@ module AliasModels {
|
||||
*/
|
||||
predicate isQualifierObject() { none() }
|
||||
|
||||
/**
|
||||
* Holds if this is the input value pointed to by the `this` pointer of an instance member
|
||||
* function.
|
||||
* DEPRECATED: Use `isQualifierObject()` instead.
|
||||
*/
|
||||
deprecated final predicate isInQualifier() { this.isQualifierObject() }
|
||||
|
||||
/**
|
||||
* Holds if this is the input value of the `this` pointer of an instance member function.
|
||||
*
|
||||
@@ -182,13 +169,6 @@ module AliasModels {
|
||||
*/
|
||||
predicate isQualifierObject() { none() }
|
||||
|
||||
/**
|
||||
* Holds if this is the output value pointed to by the `this` pointer of an instance member
|
||||
* function.
|
||||
* DEPRECATED: Use `isQualifierObject()` instead.
|
||||
*/
|
||||
deprecated final predicate isOutQualifier() { this.isQualifierObject() }
|
||||
|
||||
/**
|
||||
* Holds if this is the value returned by a function.
|
||||
*
|
||||
@@ -208,12 +188,6 @@ module AliasModels {
|
||||
*/
|
||||
predicate isReturnValue() { none() }
|
||||
|
||||
/**
|
||||
* Holds if this is the value returned by a function.
|
||||
* DEPRECATED: Use `isReturnValue()` instead.
|
||||
*/
|
||||
deprecated final predicate isOutReturnValue() { this.isReturnValue() }
|
||||
|
||||
/**
|
||||
* Holds if this is the output value pointed to by the return value of a function, if the function
|
||||
* returns a pointer, or the output value referred to by the return value of a function, if the
|
||||
@@ -234,14 +208,6 @@ module AliasModels {
|
||||
*/
|
||||
predicate isReturnValueDeref() { none() }
|
||||
|
||||
/**
|
||||
* Holds if this is the output value pointed to by the return value of a function, if the function
|
||||
* returns a pointer, or the output value referred to by the return value of a function, if the
|
||||
* function returns a reference.
|
||||
* DEPRECATED: Use `isReturnValueDeref()` instead.
|
||||
*/
|
||||
deprecated final predicate isOutReturnPointer() { this.isReturnValueDeref() }
|
||||
|
||||
/**
|
||||
* Holds if `i >= 0` and `isParameterDeref(i)` holds for this is the value, or
|
||||
* if `i = -1` and `isQualifierObject()` holds for this value.
|
||||
|
||||
@@ -701,14 +701,6 @@ class StringLiteral extends Literal, @stringliteral {
|
||||
*/
|
||||
override string getValue() { result = super.getValue() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: This predicate will be removed in a future version because
|
||||
* it is just an alias for `getValue()`; that predicate should be used instead.
|
||||
*
|
||||
* Gets the literal string without the quotes.
|
||||
*/
|
||||
deprecated string getRepresentedString() { result = this.getValue() }
|
||||
|
||||
/** Holds if this string literal is a text block (`""" ... """`). */
|
||||
predicate isTextBlock() { this.getLiteral().matches("\"\"\"%") }
|
||||
|
||||
|
||||
@@ -107,11 +107,6 @@ class XssVulnerableWriterSource extends MethodAccess {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `XssVulnerableWriterSource` instead.
|
||||
*/
|
||||
deprecated class ServletWriterSource = XssVulnerableWriterSource;
|
||||
|
||||
/**
|
||||
* Holds if `s` is an HTTP Content-Type vulnerable to XSS.
|
||||
*/
|
||||
|
||||
@@ -454,21 +454,11 @@ class MavenRepoJar extends File {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: name changed to `getGroupId` for consistent use of camel-case.
|
||||
*/
|
||||
deprecated string getGroupID() { result = this.getGroupId() }
|
||||
|
||||
/**
|
||||
* Gets the `artifactId` of this jar.
|
||||
*/
|
||||
string getArtifactId() { result = this.getParentContainer().getParentContainer().getBaseName() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: name changed to `getArtifactId` for consistent casing and consistent spelling with Maven.
|
||||
*/
|
||||
deprecated string getArtefactID() { result = this.getArtifactId() }
|
||||
|
||||
/**
|
||||
* Gets the artifact version string of this jar.
|
||||
*/
|
||||
@@ -482,11 +472,6 @@ class MavenRepoJar extends File {
|
||||
pom.getArtifact().getValue() = this.getArtifactId()
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: name changed to `artifactMatches` for consistent spelling with Maven.
|
||||
*/
|
||||
deprecated predicate artefactMatches(ProtoPom pom) { this.artifactMatches(pom) }
|
||||
|
||||
/**
|
||||
* Holds if this jar is both an artifact for the POM, and has a version string that matches the POM
|
||||
* version string. Only soft and hard version matches are supported.
|
||||
|
||||
@@ -108,20 +108,6 @@ class XmlFile extends XmlParent, File {
|
||||
/** Gets the name of this XML file. */
|
||||
override string getName() { result = File.super.getAbsolutePath() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getAbsolutePath()` instead.
|
||||
*
|
||||
* Gets the path of this XML file.
|
||||
*/
|
||||
deprecated string getPath() { result = this.getAbsolutePath() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getParentContainer().getAbsolutePath()` instead.
|
||||
*
|
||||
* Gets the path of the folder that contains this XML file.
|
||||
*/
|
||||
deprecated string getFolder() { result = this.getParentContainer().getAbsolutePath() }
|
||||
|
||||
/** Gets the encoding of this XML file. */
|
||||
string getEncoding() { xmlEncoding(this, result) }
|
||||
|
||||
|
||||
@@ -82,13 +82,6 @@ class Function extends @function, Parameterized, TypeParameterized, StmtContaine
|
||||
result = this.getDocumentation().getATagByTitle("this").getType()
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getIdentifier()` instead.
|
||||
*
|
||||
* Gets the identifier specifying the name of this function, if any.
|
||||
*/
|
||||
deprecated VarDecl getId() { result = this.getIdentifier() }
|
||||
|
||||
/** Gets the identifier specifying the name of this function, if any. */
|
||||
VarDecl getIdentifier() { result = this.getChildExpr(-1) }
|
||||
|
||||
|
||||
@@ -7,13 +7,6 @@ import javascript
|
||||
* considered to be namespace definitions.
|
||||
*/
|
||||
class NamespaceDefinition extends Stmt, @namespace_definition, AST::ValueNode {
|
||||
/**
|
||||
* DEPRECATED: Use `getIdentifier()` instead.
|
||||
*
|
||||
* Gets the identifier naming the namespace.
|
||||
*/
|
||||
deprecated Identifier getId() { result = this.getIdentifier() }
|
||||
|
||||
/**
|
||||
* Gets the identifier naming the namespace.
|
||||
*/
|
||||
@@ -189,13 +182,6 @@ class GlobalAugmentationDeclaration extends Stmt, StmtContainer, @global_augment
|
||||
|
||||
/** A TypeScript "import-equals" declaration. */
|
||||
class ImportEqualsDeclaration extends Stmt, @import_equals_declaration {
|
||||
/**
|
||||
* DEPRECATED: Use `getIdentifier()` instead.
|
||||
*
|
||||
* Gets the name under which the imported entity is imported.
|
||||
*/
|
||||
deprecated Identifier getId() { result = this.getIdentifier() }
|
||||
|
||||
/** Gets the name under which the imported entity is imported. */
|
||||
Identifier getIdentifier() { result = this.getChildExpr(0) }
|
||||
|
||||
|
||||
@@ -108,20 +108,6 @@ class XmlFile extends XmlParent, File {
|
||||
/** Gets the name of this XML file. */
|
||||
override string getName() { result = File.super.getAbsolutePath() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getAbsolutePath()` instead.
|
||||
*
|
||||
* Gets the path of this XML file.
|
||||
*/
|
||||
deprecated string getPath() { result = this.getAbsolutePath() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getParentContainer().getAbsolutePath()` instead.
|
||||
*
|
||||
* Gets the path of the folder that contains this XML file.
|
||||
*/
|
||||
deprecated string getFolder() { result = this.getParentContainer().getAbsolutePath() }
|
||||
|
||||
/** Gets the encoding of this XML file. */
|
||||
string getEncoding() { xmlEncoding(this, result) }
|
||||
|
||||
|
||||
@@ -347,9 +347,6 @@ module Http {
|
||||
*/
|
||||
abstract RouteHandler getRouteHandler();
|
||||
|
||||
/** DEPRECATED. Use `ref().flowsTo()` instead. */
|
||||
deprecated predicate flowsTo(DataFlow::Node nd) { this.ref().flowsTo(nd) }
|
||||
|
||||
private DataFlow::SourceNode ref(DataFlow::TypeTracker t) {
|
||||
t.start() and
|
||||
result = this
|
||||
@@ -372,9 +369,6 @@ module Http {
|
||||
*/
|
||||
abstract RouteHandler getRouteHandler();
|
||||
|
||||
/** DEPRECATED. Use `ref().flowsTo()` instead. */
|
||||
deprecated predicate flowsTo(DataFlow::Node nd) { this.ref().flowsTo(nd) }
|
||||
|
||||
private DataFlow::SourceNode ref(DataFlow::TypeTracker t) {
|
||||
t.start() and
|
||||
result = this
|
||||
|
||||
@@ -269,9 +269,6 @@ module SocketIO {
|
||||
|
||||
/** Gets the acknowledgment callback, if any. */
|
||||
ReceiveCallback getAck() { result.getReceiveNode() = this }
|
||||
|
||||
/** DEPRECATED. Use `getChannel()` instead. */
|
||||
deprecated string getEventName() { result = this.getChannel() }
|
||||
}
|
||||
|
||||
/** An acknowledgment callback when receiving a message. */
|
||||
@@ -360,9 +357,6 @@ module SocketIO {
|
||||
|
||||
/** Gets the acknowledgment callback, if any. */
|
||||
SendCallback getAck() { result.getSendNode() = this }
|
||||
|
||||
/** DEPRECATED. Use `getChannel()` instead. */
|
||||
deprecated string getEventName() { result = this.getChannel() }
|
||||
}
|
||||
|
||||
/** A socket.io namespace, identified by its server and its path. */
|
||||
@@ -646,9 +640,6 @@ module SocketIOClient {
|
||||
|
||||
/** Gets the acknowledgment callback, if any. */
|
||||
DataFlow::FunctionNode getAck() { result.(SendCallback).getSendNode() = this }
|
||||
|
||||
/** DEPRECATED. Use `getChannel()` instead. */
|
||||
deprecated string getEventName() { result = this.getChannel() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -40,17 +40,6 @@ abstract class ExpensiveRouteHandler extends DataFlow::Node {
|
||||
abstract predicate explain(string explanation, DataFlow::Node reference, string referenceLabel);
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED. Use `RateLimitingMiddleware` instead.
|
||||
*
|
||||
* A route handler expression that is guarded by a rate limiter.
|
||||
*/
|
||||
deprecated class RateLimitedRouteHandlerExpr extends Express::RouteHandlerExpr {
|
||||
RateLimitedRouteHandlerExpr() {
|
||||
Routing::getNode(this.flow()).isGuardedBy(any(RateLimitingMiddleware m))
|
||||
}
|
||||
}
|
||||
|
||||
// default implementations
|
||||
/**
|
||||
* A route handler that performs an expensive action, and hence should be rate-limited.
|
||||
@@ -99,17 +88,6 @@ class DatabaseAccessAsExpensiveAction extends ExpensiveAction instanceof Databas
|
||||
override string describe() { result = "a database access" }
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED. Use the `Routing::Node` API instead.
|
||||
*
|
||||
* A route handler expression that is rate-limited by a rate-limiting middleware.
|
||||
*/
|
||||
deprecated class RouteHandlerExpressionWithRateLimiter extends Expr {
|
||||
RouteHandlerExpressionWithRateLimiter() {
|
||||
Routing::getNode(this.flow()).isGuardedBy(any(RateLimitingMiddleware m))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The creation of a middleware function that acts as a rate limiter.
|
||||
*/
|
||||
|
||||
@@ -108,20 +108,6 @@ class XmlFile extends XmlParent, File {
|
||||
/** Gets the name of this XML file. */
|
||||
override string getName() { result = File.super.getAbsolutePath() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getAbsolutePath()` instead.
|
||||
*
|
||||
* Gets the path of this XML file.
|
||||
*/
|
||||
deprecated string getPath() { result = this.getAbsolutePath() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getParentContainer().getAbsolutePath()` instead.
|
||||
*
|
||||
* Gets the path of the folder that contains this XML file.
|
||||
*/
|
||||
deprecated string getFolder() { result = this.getParentContainer().getAbsolutePath() }
|
||||
|
||||
/** Gets the encoding of this XML file. */
|
||||
string getEncoding() { xmlEncoding(this, result) }
|
||||
|
||||
|
||||
@@ -398,12 +398,6 @@ class ConstantWriteAccess extends ConstantAccess {
|
||||
* constant can be ambiguous from just statically looking at the AST.
|
||||
*/
|
||||
string getAQualifiedName() { result = resolveConstantWrite(this) }
|
||||
|
||||
/**
|
||||
* Gets a qualified name for this constant. Deprecated in favor of
|
||||
* `getAQualifiedName` because this can return more than one value
|
||||
*/
|
||||
deprecated string getQualifiedName() { result = this.getAQualifiedName() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -384,12 +384,6 @@ class CaseExpr extends ControlExpr instanceof CaseExprImpl {
|
||||
*/
|
||||
final AstNode getABranch() { result = this.getBranch(_) }
|
||||
|
||||
/** Gets the `n`th `when` branch of this case expression. */
|
||||
deprecated final WhenClause getWhenBranch(int n) { result = this.getBranch(n) }
|
||||
|
||||
/** Gets a `when` branch of this case expression. */
|
||||
deprecated final WhenClause getAWhenBranch() { result = this.getABranch() }
|
||||
|
||||
/** Gets the `else` branch of this case expression, if any. */
|
||||
final StmtSequence getElseBranch() { result = this.getABranch() }
|
||||
|
||||
@@ -413,11 +407,6 @@ class CaseExpr extends ControlExpr instanceof CaseExprImpl {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `WhenClause` instead.
|
||||
*/
|
||||
deprecated class WhenExpr = WhenClause;
|
||||
|
||||
/**
|
||||
* A `when` branch of a `case` expression.
|
||||
* ```rb
|
||||
|
||||
@@ -22,9 +22,6 @@ class Expr extends Stmt, TExpr {
|
||||
ConstantValue getConstantValue() { result = getConstantValueExpr(this) }
|
||||
}
|
||||
|
||||
/** DEPRECATED: Use `SelfVariableAccess` instead. */
|
||||
deprecated class Self = SelfVariableAccess;
|
||||
|
||||
/**
|
||||
* A sequence of expressions in the right-hand side of an assignment or
|
||||
* a `return`, `break` or `next` statement.
|
||||
|
||||
@@ -68,27 +68,6 @@ class DestructuredParameter extends Parameter, TDestructuredParameter {
|
||||
final override string getAPrimaryQlClass() { result = "DestructuredParameter" }
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED
|
||||
*
|
||||
* A parameter defined using a pattern.
|
||||
*
|
||||
* This includes both simple parameters and tuple parameters.
|
||||
*/
|
||||
deprecated class PatternParameter extends Parameter, Pattern, TPatternParameter {
|
||||
override LocalVariable getAVariable() { result = Pattern.super.getAVariable() }
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED
|
||||
*
|
||||
* A parameter defined using a tuple pattern.
|
||||
*/
|
||||
deprecated class TuplePatternParameter extends PatternParameter, TuplePattern,
|
||||
TDestructuredParameter {
|
||||
final override LocalVariable getAVariable() { result = TuplePattern.super.getAVariable() }
|
||||
}
|
||||
|
||||
/** A named parameter. */
|
||||
class NamedParameter extends Parameter, TNamedParameter {
|
||||
/** Gets the name of this parameter. */
|
||||
|
||||
@@ -5,78 +5,6 @@ private import internal.TreeSitter
|
||||
private import internal.Variable
|
||||
private import internal.Parameter
|
||||
|
||||
/**
|
||||
* DEPRECATED
|
||||
*
|
||||
* A pattern.
|
||||
*/
|
||||
deprecated class Pattern extends AstNode {
|
||||
Pattern() {
|
||||
explicitAssignmentNode(toGenerated(this), _)
|
||||
or
|
||||
implicitAssignmentNode(toGenerated(this))
|
||||
or
|
||||
implicitParameterAssignmentNode(toGenerated(this), _)
|
||||
or
|
||||
this = getSynthChild(any(AssignExpr ae), 0)
|
||||
or
|
||||
this instanceof SimpleParameterImpl
|
||||
}
|
||||
|
||||
/** Gets a variable used in (or introduced by) this pattern. */
|
||||
Variable getAVariable() { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED
|
||||
*
|
||||
* A simple variable pattern.
|
||||
*/
|
||||
deprecated class VariablePattern extends Pattern, LhsExpr, TVariableAccess {
|
||||
override Variable getAVariable() { result = this.(VariableAccess).getVariable() }
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED
|
||||
*
|
||||
* A tuple pattern.
|
||||
*
|
||||
* This includes both tuple patterns in parameters and assignments. Example patterns:
|
||||
* ```rb
|
||||
* a, self.b = value
|
||||
* (a, b), c[3] = value
|
||||
* a, b, *rest, c, d = value
|
||||
* ```
|
||||
*/
|
||||
deprecated class TuplePattern extends Pattern, TTuplePattern {
|
||||
private TuplePatternImpl getImpl() { result = toGenerated(this) }
|
||||
|
||||
private Ruby::AstNode getChild(int i) { result = this.getImpl().getChildNode(i) }
|
||||
|
||||
/** Gets the `i`th pattern in this tuple pattern. */
|
||||
final Pattern getElement(int i) {
|
||||
exists(Ruby::AstNode c | c = this.getChild(i) |
|
||||
toGenerated(result) = c.(Ruby::RestAssignment).getChild()
|
||||
or
|
||||
toGenerated(result) = c
|
||||
)
|
||||
}
|
||||
|
||||
/** Gets a sub pattern in this tuple pattern. */
|
||||
final Pattern getAnElement() { result = this.getElement(_) }
|
||||
|
||||
/**
|
||||
* Gets the index of the pattern with the `*` marker on it, if it exists.
|
||||
* In the example below the index is `2`.
|
||||
* ```rb
|
||||
* a, b, *rest, c, d = value
|
||||
* ```
|
||||
*/
|
||||
final int getRestIndex() { result = this.getImpl().getRestIndex() }
|
||||
|
||||
override Variable getAVariable() { result = this.getElement(_).getAVariable() }
|
||||
}
|
||||
|
||||
private class TPatternNode =
|
||||
TArrayPattern or TFindPattern or THashPattern or TAlternativePattern or TAsPattern or
|
||||
TParenthesizedPattern or TExpressionReferencePattern or TVariableReferencePattern;
|
||||
|
||||
@@ -875,15 +875,10 @@ class TParameter =
|
||||
|
||||
class TSimpleParameter = TSimpleParameterReal or TSimpleParameterSynth;
|
||||
|
||||
deprecated class TPatternParameter = TSimpleParameter or TDestructuredParameter;
|
||||
|
||||
class TNamedParameter =
|
||||
TSimpleParameter or TBlockParameter or THashSplatParameter or TKeywordParameter or
|
||||
TOptionalParameter or TSplatParameter;
|
||||
|
||||
deprecated class TTuplePattern =
|
||||
TDestructuredParameter or TDestructuredLeftAssignment or TLeftAssignmentList;
|
||||
|
||||
class TVariableAccess =
|
||||
TLocalVariableAccess or TGlobalVariableAccess or TInstanceVariableAccess or
|
||||
TClassVariableAccess or TSelfVariableAccess;
|
||||
|
||||
@@ -4,25 +4,6 @@ private import codeql.ruby.ast.internal.Parameter
|
||||
private import AST
|
||||
private import TreeSitter
|
||||
|
||||
deprecated class TuplePatternImpl extends Ruby::AstNode {
|
||||
TuplePatternImpl() {
|
||||
this instanceof DestructuredParameterImpl or
|
||||
this instanceof DestructuredLhsExprImpl
|
||||
}
|
||||
|
||||
Ruby::AstNode getChildNode(int i) {
|
||||
result =
|
||||
[
|
||||
this.(DestructuredParameterImpl).getChildNode(i),
|
||||
this.(DestructuredLhsExprImpl).getChildNode(i)
|
||||
]
|
||||
}
|
||||
|
||||
final int getRestIndex() {
|
||||
result = unique(int i | this.getChildNode(i) instanceof Ruby::RestAssignment)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `node` is a case pattern.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user