Skip to content

Commit d9e3569

Browse files
authored
Merge pull request github#13350 from erik-krogh/once-again-deps-not-py
C++: delete old deprecations
2 parents cc45db7 + 39438c6 commit d9e3569

File tree

19 files changed

+6
-475
lines changed

19 files changed

+6
-475
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+
* Deleted the deprecated `hasCopyConstructor` predicate from the `Class` class in `Class.qll`.
5+
* Deleted many deprecated predicates and classes with uppercase `AST`, `SSA`, `CFG`, `API`, etc. in their names. Use the PascalCased versions instead.
6+
* Deleted the deprecated `CodeDuplication.qll` file.

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -176,20 +176,6 @@ class Class extends UserType {
176176
/** Holds if this class, struct or union has a constructor. */
177177
predicate hasConstructor() { exists(this.getAConstructor()) }
178178

179-
/**
180-
* Holds if this class has a copy constructor that is either explicitly
181-
* declared (though possibly `= delete`) or is auto-generated, non-trivial
182-
* and called from somewhere.
183-
*
184-
* DEPRECATED: There is more than one reasonable definition of what it means
185-
* to have a copy constructor, and we do not want to promote one particular
186-
* definition by naming it with this predicate. Having a copy constructor
187-
* could mean that such a member is declared or defined in the source or that
188-
* it is callable by a particular caller. For C++11, there's also a question
189-
* of whether to include members that are defaulted or deleted.
190-
*/
191-
deprecated predicate hasCopyConstructor() { this.getAMemberFunction() instanceof CopyConstructor }
192-
193179
/**
194180
* Like accessOfBaseMember but returns multiple results if there are multiple
195181
* paths to `base` through the inheritance graph.

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ class PrintAstConfiguration extends TPrintAstConfiguration {
2727
predicate shouldPrintFunction(Function func) { any() }
2828
}
2929

30-
/** DEPRECATED: Alias for PrintAstConfiguration */
31-
deprecated class PrintASTConfiguration = PrintAstConfiguration;
32-
3330
private predicate shouldPrintFunction(Function func) {
3431
exists(PrintAstConfiguration config | config.shouldPrintFunction(func))
3532
}
@@ -239,9 +236,6 @@ class PrintAstNode extends TPrintAstNode {
239236
}
240237
}
241238

242-
/** DEPRECATED: Alias for PrintAstNode */
243-
deprecated class PrintASTNode = PrintAstNode;
244-
245239
/**
246240
* Class that restricts the elements that we compute `qlClass` for.
247241
*/
@@ -286,19 +280,13 @@ abstract class BaseAstNode extends PrintAstNode {
286280
deprecated Locatable getAST() { result = this.getAst() }
287281
}
288282

289-
/** DEPRECATED: Alias for BaseAstNode */
290-
deprecated class BaseASTNode = BaseAstNode;
291-
292283
/**
293284
* A node representing an AST node other than a `DeclarationEntry`.
294285
*/
295286
abstract class AstNode extends BaseAstNode, TAstNode {
296287
AstNode() { this = TAstNode(ast) }
297288
}
298289

299-
/** DEPRECATED: Alias for AstNode */
300-
deprecated class ASTNode = AstNode;
301-
302290
/**
303291
* A node representing an `Expr`.
304292
*/

cpp/ql/lib/semmle/code/cpp/controlflow/SSA.qll

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ library class StandardSsa extends SsaHelper {
1414
StandardSsa() { this = 0 }
1515
}
1616

17-
/** DEPRECATED: Alias for StandardSsa */
18-
deprecated class StandardSSA = StandardSsa;
19-
2017
/**
2118
* A definition of one or more SSA variables, including phi node definitions.
2219
* An _SSA variable_, as defined in the literature, is effectively the pair of

cpp/ql/lib/semmle/code/cpp/controlflow/SSAUtils.qll

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,3 @@ library class SsaHelper extends int {
312312
ssa_use(v, result, _, _)
313313
}
314314
}
315-
316-
/** DEPRECATED: Alias for SsaHelper */
317-
deprecated class SSAHelper = SsaHelper;

cpp/ql/lib/semmle/code/cpp/controlflow/internal/CFG.qll

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,9 +1385,6 @@ private module Cached {
13851385
conditionalSuccessor(n1, _, n2)
13861386
}
13871387

1388-
/** DEPRECATED: Alias for qlCfgSuccessor */
1389-
deprecated predicate qlCFGSuccessor = qlCfgSuccessor/2;
1390-
13911388
/**
13921389
* Holds if `n2` is a control-flow node such that the control-flow
13931390
* edge `(n1, n2)` may be taken when `n1` is an expression that is true.
@@ -1398,9 +1395,6 @@ private module Cached {
13981395
not conditionalSuccessor(n1, false, n2)
13991396
}
14001397

1401-
/** DEPRECATED: Alias for qlCfgTrueSuccessor */
1402-
deprecated predicate qlCFGTrueSuccessor = qlCfgTrueSuccessor/2;
1403-
14041398
/**
14051399
* Holds if `n2` is a control-flow node such that the control-flow
14061400
* edge `(n1, n2)` may be taken when `n1` is an expression that is false.
@@ -1410,7 +1404,4 @@ private module Cached {
14101404
conditionalSuccessor(n1, false, n2) and
14111405
not conditionalSuccessor(n1, true, n2)
14121406
}
1413-
1414-
/** DEPRECATED: Alias for qlCfgFalseSuccessor */
1415-
deprecated predicate qlCFGFalseSuccessor = qlCfgFalseSuccessor/2;
14161407
}

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -577,9 +577,6 @@ private Overlap getVariableMemoryLocationOverlap(
577577
*/
578578
predicate canReuseSsaForOldResult(Instruction instr) { OldSsa::canReuseSsaForMemoryResult(instr) }
579579

580-
/** DEPRECATED: Alias for canReuseSsaForOldResult */
581-
deprecated predicate canReuseSSAForOldResult = canReuseSsaForOldResult/1;
582-
583580
bindingset[result, b]
584581
private boolean unbindBool(boolean b) { result != b.booleanNot() }
585582

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,12 @@ private module Shared {
7474

7575
class TNonSsaMemoryOperand = Internal::TNonSsaMemoryOperand;
7676

77-
/** DEPRECATED: Alias for TNonSsaMemoryOperand */
78-
deprecated class TNonSSAMemoryOperand = TNonSsaMemoryOperand;
79-
8077
/**
8178
* Returns the non-Phi memory operand with the specified parameters.
8279
*/
8380
TNonSsaMemoryOperand nonSsaMemoryOperand(TRawInstruction useInstr, MemoryOperandTag tag) {
8481
result = Internal::TNonSsaMemoryOperand(useInstr, tag)
8582
}
86-
87-
/** DEPRECATED: Alias for nonSsaMemoryOperand */
88-
deprecated TNonSSAMemoryOperand nonSSAMemoryOperand(TRawInstruction useInstr, MemoryOperandTag tag) {
89-
result = nonSsaMemoryOperand(useInstr, tag)
90-
}
9183
}
9284

9385
/**
@@ -167,9 +159,6 @@ module UnaliasedSsaOperands {
167159
TChiOperand chiOperand(Unaliased::Instruction useInstr, ChiOperandTag tag) { none() }
168160
}
169161

170-
/** DEPRECATED: Alias for UnaliasedSsaOperands */
171-
deprecated module UnaliasedSSAOperands = UnaliasedSsaOperands;
172-
173162
/**
174163
* Provides wrappers for the constructors of each branch of `TOperand` that is used by the
175164
* aliased SSA stage.
@@ -217,6 +206,3 @@ module AliasedSsaOperands {
217206
result = Internal::TAliasedChiOperand(useInstr, tag)
218207
}
219208
}
220-
221-
/** DEPRECATED: Alias for AliasedSsaOperands */
222-
deprecated module AliasedSSAOperands = AliasedSsaOperands;

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/IRConstruction.qll

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,6 @@ Locatable getInstructionAst(TStageInstruction instr) {
375375
)
376376
}
377377

378-
/** DEPRECATED: Alias for getInstructionAst */
379-
deprecated Locatable getInstructionAST(TStageInstruction instr) {
380-
result = getInstructionAst(instr)
381-
}
382-
383378
CppType getInstructionResultType(TStageInstruction instr) {
384379
getInstructionTranslatedElement(instr).hasInstruction(_, getInstructionTag(instr), result)
385380
or

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ abstract class TranslatedExpr extends TranslatedElement {
7676

7777
final override Locatable getAst() { result = expr }
7878

79-
/** DEPRECATED: Alias for getAst */
80-
deprecated override Locatable getAST() { result = this.getAst() }
81-
8279
final override Declaration getFunction() { result = getEnclosingDeclaration(expr) }
8380

8481
/**

0 commit comments

Comments
 (0)