Skip to content

Commit a45d535

Browse files
committed
delete/deprecate some unused code in internal/ folders
1 parent fe3b3e8 commit a45d535

File tree

5 files changed

+1
-39
lines changed

5 files changed

+1
-39
lines changed

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,6 @@ Instruction getSourceAddressFromNode(Node node) {
266266
result = getSourceAddress(node.asOperand().(SideEffectOperand).getUse())
267267
}
268268

269-
/** Gets the source value of `instr` if it's an instruction that behaves like a `LoadInstruction`. */
270-
Instruction getSourceValue(Instruction instr) { result = getSourceValueOperand(instr).getDef() }
271-
272269
/**
273270
* Gets the operand that represents the source value of `instr` if it's an instruction
274271
* that behaves like a `LoadInstruction`.

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

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,3 @@ predicate alwaysNotNullCallable(Callable c) {
3131
forex(Expr e | c.canReturn(e) | e instanceof NonNullExpr)
3232
)
3333
}
34-
35-
/** Holds if callable 'c' always throws an exception. */
36-
predicate alwaysThrowsCallable(Callable c) {
37-
finalCallable(c) and
38-
(
39-
forex(ControlFlow::Node pre | pre = c.getExitPoint().getAPredecessor() |
40-
pre.getElement() instanceof ThrowElement
41-
)
42-
or
43-
exists(CIL::Method m | m.matchesHandle(c) | CR::alwaysThrowsMethod(m))
44-
)
45-
}
46-
47-
/** Holds if callable `c` always throws exception `ex`. */
48-
predicate alwaysThrowsException(Callable c, Class ex) {
49-
finalCallable(c) and
50-
(
51-
forex(ControlFlow::Node pre | pre = c.getExitPoint().getAPredecessor() |
52-
pre.getElement().(ThrowElement).getThrownExceptionType() = ex
53-
)
54-
or
55-
exists(CIL::Method m, CIL::Type t | m.matchesHandle(c) |
56-
CR::alwaysThrowsException(m, t) and t.matchesHandle(ex)
57-
)
58-
)
59-
}

python/ql/lib/semmle/python/frameworks/internal/PEP249Impl.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ module PEP249 {
121121
}
122122

123123
/** Gets a reference to a result of calling the `cursor` method on a database connection. */
124-
private DataFlow::TypeTrackingNode methodResult(DataFlow::TypeTracker t) {
124+
deprecated private DataFlow::TypeTrackingNode methodResult(DataFlow::TypeTracker t) {
125125
t.start() and
126126
result.asCfgNode().(CallNode).getFunction() = methodRef().asCfgNode()
127127
or

ruby/ql/lib/codeql/ruby/controlflow/internal/Splitting.qll

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,6 @@ module EnsureSplitting {
200200
result = ConditionalCompletionSplitting::getNextListOrder() + kind.getNestLevel()
201201
}
202202

203-
int getNextListOrder() {
204-
result = max([getListOrder(_) + 1, ConditionalCompletionSplitting::getNextListOrder()])
205-
}
206-
207203
private class EnsureSplitKind extends SplitKind, TEnsureSplitKind {
208204
private int nestLevel;
209205

ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -579,11 +579,6 @@ private module ArgumentNodes {
579579
}
580580
}
581581

582-
/** A data-flow node that represents the `self` argument of a call. */
583-
class SelfArgumentNode extends ExplicitArgumentNode {
584-
SelfArgumentNode() { arg.isArgumentOf(_, any(ArgumentPosition pos | pos.isSelf())) }
585-
}
586-
587582
/** A data-flow node that represents a block argument. */
588583
class BlockArgumentNode extends ArgumentNode {
589584
BlockArgumentNode() {

0 commit comments

Comments
 (0)