diff --git a/cpp/ql/lib/semmle/code/cpp/controlflow/internal/CFG.qll b/cpp/ql/lib/semmle/code/cpp/controlflow/internal/CFG.qll index 6ec802cf281..96f03c931bf 100644 --- a/cpp/ql/lib/semmle/code/cpp/controlflow/internal/CFG.qll +++ b/cpp/ql/lib/semmle/code/cpp/controlflow/internal/CFG.qll @@ -447,26 +447,6 @@ private predicate skipInitializer(Initializer init) { ) } -/** - * Holds if `e` is an expression in a static initializer that must be evaluated - * at run time. This predicate computes "is non-const" instead of "is const" in - * order to avoid recursion through forall. - */ -private predicate runtimeExprInStaticInitializer(Expr e) { - inStaticInitializer(e) and - if e instanceof AggregateLiteral - then runtimeExprInStaticInitializer(e.getAChild()) - else not e.getFullyConverted().isConstant() -} - -/** Holds if `e` is part of the initializer of a local static variable. */ -private predicate inStaticInitializer(Expr e) { - exists(LocalVariable local | - local.isStatic() and - e.getParent+() = local.getInitializer() - ) -} - /** * Gets the `i`th child of `n` in control-flow order, where the `i`-indexes are * contiguous, and the first index is 0. diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImplCommon.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImplCommon.qll index 19bf1d4f27d..eed0d050735 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImplCommon.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImplCommon.qll @@ -287,20 +287,6 @@ private module SsaDefReaches { ) } - /** - * Holds if the SSA definition of `v` at `def` reaches uncertain SSA definition - * `redef` in the same basic block, without crossing another SSA definition of `v`. - */ - predicate ssaDefReachesUncertainDefWithinBlock( - SourceVariable v, Definition def, UncertainWriteDefinition redef - ) { - exists(BasicBlock bb, int rnk, int i | - ssaDefReachesRank(bb, def, rnk, v) and - rnk = ssaRefRank(bb, i, v, SsaDef()) - 1 and - redef.definesAt(v, bb, i) - ) - } - /** * Same as `ssaRefRank()`, but restricted to a particular SSA definition `def`. */ diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/reachability/DominanceInternal.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/reachability/DominanceInternal.qll index cee8fa1543b..aaa4cc7bd53 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/reachability/DominanceInternal.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/reachability/DominanceInternal.qll @@ -1,7 +1,5 @@ private import ReachableBlock as Reachability -private module ReachabilityGraph = Reachability::Graph; - module Graph { import Reachability::Graph diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/reachability/DominanceInternal.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/reachability/DominanceInternal.qll index cee8fa1543b..aaa4cc7bd53 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/reachability/DominanceInternal.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/reachability/DominanceInternal.qll @@ -1,7 +1,5 @@ private import ReachableBlock as Reachability -private module ReachabilityGraph = Reachability::Graph; - module Graph { import Reachability::Graph diff --git a/csharp/ql/lib/semmle/code/cil/internal/SsaImplCommon.qll b/csharp/ql/lib/semmle/code/cil/internal/SsaImplCommon.qll index 19bf1d4f27d..eed0d050735 100644 --- a/csharp/ql/lib/semmle/code/cil/internal/SsaImplCommon.qll +++ b/csharp/ql/lib/semmle/code/cil/internal/SsaImplCommon.qll @@ -287,20 +287,6 @@ private module SsaDefReaches { ) } - /** - * Holds if the SSA definition of `v` at `def` reaches uncertain SSA definition - * `redef` in the same basic block, without crossing another SSA definition of `v`. - */ - predicate ssaDefReachesUncertainDefWithinBlock( - SourceVariable v, Definition def, UncertainWriteDefinition redef - ) { - exists(BasicBlock bb, int rnk, int i | - ssaDefReachesRank(bb, def, rnk, v) and - rnk = ssaRefRank(bb, i, v, SsaDef()) - 1 and - redef.definesAt(v, bb, i) - ) - } - /** * Same as `ssaRefRank()`, but restricted to a particular SSA definition `def`. */ diff --git a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/Splitting.qll b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/Splitting.qll index b6b0c95ddc0..02fb893cb7f 100644 --- a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/Splitting.qll +++ b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/Splitting.qll @@ -511,13 +511,6 @@ module FinallySplitting { predicate isEntryNode() { first(try.getFinally(), this) } } - /** A control flow element that does not belong to a `finally` block. */ - private class NonFinallyControlFlowElement extends ControlFlowElement { - NonFinallyControlFlowElement() { - not this = any(Statements::TryStmtTree t).getAFinallyDescendant() - } - } - /** * A split for elements belonging to a `finally` block, which determines how to * continue execution after leaving the `finally` block. For example, in diff --git a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/pressa/SsaImplCommon.qll b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/pressa/SsaImplCommon.qll index 19bf1d4f27d..eed0d050735 100644 --- a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/pressa/SsaImplCommon.qll +++ b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/pressa/SsaImplCommon.qll @@ -287,20 +287,6 @@ private module SsaDefReaches { ) } - /** - * Holds if the SSA definition of `v` at `def` reaches uncertain SSA definition - * `redef` in the same basic block, without crossing another SSA definition of `v`. - */ - predicate ssaDefReachesUncertainDefWithinBlock( - SourceVariable v, Definition def, UncertainWriteDefinition redef - ) { - exists(BasicBlock bb, int rnk, int i | - ssaDefReachesRank(bb, def, rnk, v) and - rnk = ssaRefRank(bb, i, v, SsaDef()) - 1 and - redef.definesAt(v, bb, i) - ) - } - /** * Same as `ssaRefRank()`, but restricted to a particular SSA definition `def`. */ diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImplCommon.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImplCommon.qll index 19bf1d4f27d..eed0d050735 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImplCommon.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImplCommon.qll @@ -287,20 +287,6 @@ private module SsaDefReaches { ) } - /** - * Holds if the SSA definition of `v` at `def` reaches uncertain SSA definition - * `redef` in the same basic block, without crossing another SSA definition of `v`. - */ - predicate ssaDefReachesUncertainDefWithinBlock( - SourceVariable v, Definition def, UncertainWriteDefinition redef - ) { - exists(BasicBlock bb, int rnk, int i | - ssaDefReachesRank(bb, def, rnk, v) and - rnk = ssaRefRank(bb, i, v, SsaDef()) - 1 and - redef.definesAt(v, bb, i) - ) - } - /** * Same as `ssaRefRank()`, but restricted to a particular SSA definition `def`. */ diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/basessa/SsaImplCommon.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/basessa/SsaImplCommon.qll index 19bf1d4f27d..eed0d050735 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/basessa/SsaImplCommon.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/basessa/SsaImplCommon.qll @@ -287,20 +287,6 @@ private module SsaDefReaches { ) } - /** - * Holds if the SSA definition of `v` at `def` reaches uncertain SSA definition - * `redef` in the same basic block, without crossing another SSA definition of `v`. - */ - predicate ssaDefReachesUncertainDefWithinBlock( - SourceVariable v, Definition def, UncertainWriteDefinition redef - ) { - exists(BasicBlock bb, int rnk, int i | - ssaDefReachesRank(bb, def, rnk, v) and - rnk = ssaRefRank(bb, i, v, SsaDef()) - 1 and - redef.definesAt(v, bb, i) - ) - } - /** * Same as `ssaRefRank()`, but restricted to a particular SSA definition `def`. */ diff --git a/csharp/ql/lib/semmle/code/csharp/frameworks/ServiceStack.qll b/csharp/ql/lib/semmle/code/csharp/frameworks/ServiceStack.qll index 4f914899a98..bf4a72b4174 100644 --- a/csharp/ql/lib/semmle/code/csharp/frameworks/ServiceStack.qll +++ b/csharp/ql/lib/semmle/code/csharp/frameworks/ServiceStack.qll @@ -24,13 +24,6 @@ private class ServiceClass extends Class { } } -/** Top-level Request DTO types */ -private class RequestDTO extends Class { - RequestDTO() { - this.getABaseType*().getABaseInterface().hasQualifiedName("ServiceStack", "IReturn") - } -} - /** Flow sources for the ServiceStack framework */ module Sources { private import semmle.code.csharp.security.dataflow.flowsources.Remote diff --git a/csharp/ql/src/Likely Bugs/EqualityCheckOnFloats.ql b/csharp/ql/src/Likely Bugs/EqualityCheckOnFloats.ql index 5cbbbb83751..1884cd5cc5f 100644 --- a/csharp/ql/src/Likely Bugs/EqualityCheckOnFloats.ql +++ b/csharp/ql/src/Likely Bugs/EqualityCheckOnFloats.ql @@ -11,13 +11,6 @@ import csharp -class ZeroFloatLiteral extends FloatLiteral { - ZeroFloatLiteral() { - this.getValue() = "0" or - this.getValue() = "0.0" - } -} - from EqualityOperation e where e.getAnOperand().getType() instanceof FloatingPointType and diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/DominanceInternal.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/DominanceInternal.qll index cee8fa1543b..aaa4cc7bd53 100644 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/DominanceInternal.qll +++ b/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/DominanceInternal.qll @@ -1,7 +1,5 @@ private import ReachableBlock as Reachability -private module ReachabilityGraph = Reachability::Graph; - module Graph { import Reachability::Graph diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/DominanceInternal.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/DominanceInternal.qll index cee8fa1543b..aaa4cc7bd53 100644 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/DominanceInternal.qll +++ b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/DominanceInternal.qll @@ -1,7 +1,5 @@ private import ReachableBlock as Reachability -private module ReachabilityGraph = Reachability::Graph; - module Graph { import Reachability::Graph diff --git a/csharp/ql/src/experimental/ir/internal/CSharpType.qll b/csharp/ql/src/experimental/ir/internal/CSharpType.qll index 02dee3edff9..d87596ae643 100644 --- a/csharp/ql/src/experimental/ir/internal/CSharpType.qll +++ b/csharp/ql/src/experimental/ir/internal/CSharpType.qll @@ -88,15 +88,6 @@ predicate hasAddressType(int byteSize) { */ predicate hasFunctionAddressType(int byteSize) { byteSize = getTypeSize(any(NullType type)) } -private int getBaseClassSize(ValueOrRefType type) { - if exists(type.getBaseClass()) then result = getContentSize(type.getBaseClass()) else result = 0 -} - -private int getContentSize(ValueOrRefType type) { - result = - getBaseClassSize(type) + sum(Field field | not field.isStatic() | getTypeSize(field.getType())) -} - private predicate isOpaqueType(ValueOrRefType type) { type instanceof Struct or type instanceof NullableType or diff --git a/java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJBRestrictions.qll b/java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJBRestrictions.qll index e5e459c93bc..23e1518c916 100644 --- a/java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJBRestrictions.qll +++ b/java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJBRestrictions.qll @@ -9,26 +9,6 @@ import EJB /** A method or constructor that may not be called from an EJB. */ abstract class ForbiddenCallable extends Callable { } -/** - * Specialized version of the `polyCalls(..)` predicate for the use - * case of finding "shortest" call chains from EJBs to forbidden - * methods. This is the same as `polyCalls(..)`, with two exceptions: - * - * - It does not consider calls into an EJB method. - * - It does not consider calls from "forbidden callables". - */ -private predicate ejbPolyCalls(Callable origin, Callable target) { - origin.polyCalls(target) and - not exists(EJB ejb | target = ejb.getACallable()) and - not origin instanceof ForbiddenCallable -} - -private predicate ejbPolyCallsPlus(Callable origin, Callable target) { - exists(EJB ejb | origin = ejb.getACallable() | ejbPolyCalls(origin, target)) - or - exists(Callable mid | ejbPolyCallsPlus(origin, mid) and ejbPolyCalls(mid, target)) -} - /** * Holds if there exists a call chain from an EJB-`Callable` `origin` to a `ForbiddenCallable` `target` * that does not contain any intermediate EJB-`Callable` or `ForbiddenCallable`, diff --git a/java/ql/src/Likely Bugs/Concurrency/BusyWait.ql b/java/ql/src/Likely Bugs/Concurrency/BusyWait.ql index 22ed091e052..e9b160222bc 100644 --- a/java/ql/src/Likely Bugs/Concurrency/BusyWait.ql +++ b/java/ql/src/Likely Bugs/Concurrency/BusyWait.ql @@ -16,13 +16,6 @@ import java -class ReachFromStmt extends Stmt { - ReachFromStmt() { - exists(Method m | m.getBody() = this) or - exists(WhileStmt w | w.getStmt() = this) - } -} - class SleepMethod extends Method { SleepMethod() { this.getName() = "sleep" and diff --git a/java/ql/src/Performance/ConcatenationInLoops.ql b/java/ql/src/Performance/ConcatenationInLoops.ql index 2f0d771026b..e4280678e4b 100644 --- a/java/ql/src/Performance/ConcatenationInLoops.ql +++ b/java/ql/src/Performance/ConcatenationInLoops.ql @@ -15,11 +15,6 @@ import semmle.code.java.Expr import semmle.code.java.Statement import semmle.code.java.JDK -/** A use of `+` that has type `String`. */ -class StringCat extends AddExpr { - StringCat() { this.getType() instanceof TypeString } -} - /** * An assignment of the form * diff --git a/java/ql/src/experimental/Security/CWE/CWE-759/HashWithoutSalt.ql b/java/ql/src/experimental/Security/CWE/CWE-759/HashWithoutSalt.ql index 42213de55f6..bea7faff694 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-759/HashWithoutSalt.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-759/HashWithoutSalt.ql @@ -36,16 +36,6 @@ class MessageDigest extends RefType { MessageDigest() { this.hasQualifiedName("java.security", "MessageDigest") } } -/** The method call `MessageDigest.getInstance(...)` */ -class MDConstructor extends StaticMethodAccess { - MDConstructor() { - exists(Method m | m = this.getMethod() | - m.getDeclaringType() instanceof MessageDigest and - m.hasName("getInstance") - ) - } -} - /** The method `digest()` declared in `java.security.MessageDigest`. */ class MDDigestMethod extends Method { MDDigestMethod() { diff --git a/javascript/ql/lib/semmle/javascript/security/dataflow/InsecureDownloadQuery.qll b/javascript/ql/lib/semmle/javascript/security/dataflow/InsecureDownloadQuery.qll index 813a1642d8a..de415cf2495 100644 --- a/javascript/ql/lib/semmle/javascript/security/dataflow/InsecureDownloadQuery.qll +++ b/javascript/ql/lib/semmle/javascript/security/dataflow/InsecureDownloadQuery.qll @@ -10,14 +10,6 @@ import javascript import InsecureDownloadCustomizations::InsecureDownload // Materialize flow labels -private class ConcreteSensitiveInsecureUrl extends Label::SensitiveInsecureUrl { - ConcreteSensitiveInsecureUrl() { this = this } -} - -private class ConcreteInsecureUrl extends Label::InsecureUrl { - ConcreteInsecureUrl() { this = this } -} - /** * A taint tracking configuration for download of sensitive file through insecure connection. */ diff --git a/python/ql/lib/semmle/python/Flow.qll b/python/ql/lib/semmle/python/Flow.qll index 2880969ce00..3b90e6f8c88 100755 --- a/python/ql/lib/semmle/python/Flow.qll +++ b/python/ql/lib/semmle/python/Flow.qll @@ -969,12 +969,6 @@ private module Scopes { scope = n.getEnclosingModule() } - private predicate maybe_defined(SsaVariable var) { - exists(var.getDefinition()) and not py_ssa_phi(var, _) and not var.getDefinition().isDelete() - or - exists(SsaVariable input | input = var.getAPhiInput() | maybe_defined(input)) - } - private predicate maybe_undefined(SsaVariable var) { not exists(var.getDefinition()) and not py_ssa_phi(var, _) or diff --git a/python/ql/lib/semmle/python/dataflow/old/Implementation.qll b/python/ql/lib/semmle/python/dataflow/old/Implementation.qll index ab44f1f1d85..796dc743478 100644 --- a/python/ql/lib/semmle/python/dataflow/old/Implementation.qll +++ b/python/ql/lib/semmle/python/dataflow/old/Implementation.qll @@ -900,22 +900,6 @@ private class EssaTaintTracking extends string { or result = this.testEvaluates(defn, not_operand(test), use, src).booleanNot() } - - /** - * Holds if `test` is the test in a branch and `use` is that test - * with all the `not` prefixes removed. - */ - private predicate boolean_filter(ControlFlowNode test, ControlFlowNode use) { - any(PyEdgeRefinement ref).getTest() = test and - ( - use = test - or - exists(ControlFlowNode notuse | - this.boolean_filter(test, notuse) and - use = not_operand(notuse) - ) - ) - } } private predicate testEvaluatesMaybe(ControlFlowNode test, ControlFlowNode use) { diff --git a/python/ql/lib/semmle/python/frameworks/Invoke.qll b/python/ql/lib/semmle/python/frameworks/Invoke.qll index 6cef9586053..23aaa527ff2 100644 --- a/python/ql/lib/semmle/python/frameworks/Invoke.qll +++ b/python/ql/lib/semmle/python/frameworks/Invoke.qll @@ -21,9 +21,6 @@ private module Invoke { /** Provides models for the `invoke` module. */ module invoke { - /** Gets a reference to the `invoke.context` module. */ - API::Node context() { result = invoke().getMember("context") } - /** Provides models for the `invoke.context` module */ module context { /** Provides models for the `invoke.context.Context` class */ diff --git a/python/ql/lib/semmle/python/frameworks/RestFramework.qll b/python/ql/lib/semmle/python/frameworks/RestFramework.qll index aa4e47cc6d6..252aeb0db13 100644 --- a/python/ql/lib/semmle/python/frameworks/RestFramework.qll +++ b/python/ql/lib/semmle/python/frameworks/RestFramework.qll @@ -295,17 +295,6 @@ private module RestFramework { result = API::moduleImport("rest_framework").getMember("response").getMember("Response") } - /** - * A source of instances of `rest_framework.response.Response`, extend this class to model new instances. - * - * This can include instantiations of the class, return values from function - * calls, or a special parameter that will be set when functions are called by an external - * library. - * - * Use the predicate `Response::instance()` to get references to instances of `rest_framework.response.Response`. - */ - abstract class InstanceSource extends DataFlow::LocalSourceNode { } - /** A direct instantiation of `rest_framework.response.Response`. */ private class ClassInstantiation extends PrivateDjango::django::http::response::HttpResponse::InstanceSource, DataFlow::CallCfgNode { diff --git a/python/ql/lib/semmle/python/pointsto/Base.qll b/python/ql/lib/semmle/python/pointsto/Base.qll index 2ce996cc0b7..2317f045b26 100644 --- a/python/ql/lib/semmle/python/pointsto/Base.qll +++ b/python/ql/lib/semmle/python/pointsto/Base.qll @@ -185,11 +185,6 @@ predicate function_can_never_return(FunctionObject func) { func = ModuleObject::named("sys").attr("exit") } -private newtype TIterationDefinition = - TIterationDefinition_(SsaSourceVariable var, ControlFlowNode def, ControlFlowNode sequence) { - SsaSource::iteration_defined_variable(var, def, sequence) - } - /** Hold if outer contains inner, both are contained within a test and inner is a use is a plain use or an attribute lookup */ pragma[noinline] predicate contains_interesting_expression_within_test(ControlFlowNode outer, ControlFlowNode inner) { diff --git a/python/ql/src/Lexical/CommentedOutCode.qll b/python/ql/src/Lexical/CommentedOutCode.qll index 736e9ec5c4a..b26daad1491 100644 --- a/python/ql/src/Lexical/CommentedOutCode.qll +++ b/python/ql/src/Lexical/CommentedOutCode.qll @@ -40,16 +40,6 @@ private predicate class_statement(Comment c) { private predicate triple_quote(Comment c) { c.getText().regexpMatch("#.*(\"\"\"|''').*") } -private predicate triple_quoted_string_part(Comment start, Comment end) { - triple_quote(start) and end = start - or - exists(Comment mid | - triple_quoted_string_part(start, mid) and - end = non_empty_following(mid) and - not triple_quote(end) - ) -} - private predicate maybe_code(Comment c) { not non_code(c) and not filler(c) and not endline_comment(c) and not file_or_url(c) or diff --git a/python/ql/test/library-tests/locations/implicit_concatenation/part_locations.ql b/python/ql/test/library-tests/locations/implicit_concatenation/part_locations.ql index 07e339bc0f1..fa25cb671c9 100644 --- a/python/ql/test/library-tests/locations/implicit_concatenation/part_locations.ql +++ b/python/ql/test/library-tests/locations/implicit_concatenation/part_locations.ql @@ -1,9 +1,5 @@ import python -class ImplicitConcat extends StrConst { - ImplicitConcat() { exists(this.getAnImplicitlyConcatenatedPart()) } -} - from StringPart s select s.getLocation().getStartLine(), s.getText(), s.getLocation().getStartColumn(), s.getLocation().getEndColumn() diff --git a/python/ql/test/library-tests/locations/implicit_concatenation/parts.ql b/python/ql/test/library-tests/locations/implicit_concatenation/parts.ql index 0637e72df6e..992f695663e 100644 --- a/python/ql/test/library-tests/locations/implicit_concatenation/parts.ql +++ b/python/ql/test/library-tests/locations/implicit_concatenation/parts.ql @@ -1,9 +1,5 @@ import python -class ImplicitConcat extends StrConst { - ImplicitConcat() { exists(this.getAnImplicitlyConcatenatedPart()) } -} - from StrConst s, StringPart part, int n where part = s.getImplicitlyConcatenatedPart(n) select s.getLocation().getStartLine(), s.getText(), n, part.getText() diff --git a/ql/ql/src/queries/style/ToStringInQueryLogic.ql b/ql/ql/src/queries/style/ToStringInQueryLogic.ql index ff945bbcc55..cff68cae532 100644 --- a/ql/ql/src/queries/style/ToStringInQueryLogic.ql +++ b/ql/ql/src/queries/style/ToStringInQueryLogic.ql @@ -143,10 +143,6 @@ module DataFlow { override string toString() { result = p.toString() } } - newtype TReturnKind = - TNormalReturnKind() or - TParameterOutKind(int i) { any(Parameter p).getIndex() = i } - /** A data flow node that represents the output of a call at the call site. */ abstract class OutNode extends Node { /** Gets the underlying call. */ diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/SsaImplCommon.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/SsaImplCommon.qll index 19bf1d4f27d..eed0d050735 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/SsaImplCommon.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/SsaImplCommon.qll @@ -287,20 +287,6 @@ private module SsaDefReaches { ) } - /** - * Holds if the SSA definition of `v` at `def` reaches uncertain SSA definition - * `redef` in the same basic block, without crossing another SSA definition of `v`. - */ - predicate ssaDefReachesUncertainDefWithinBlock( - SourceVariable v, Definition def, UncertainWriteDefinition redef - ) { - exists(BasicBlock bb, int rnk, int i | - ssaDefReachesRank(bb, def, rnk, v) and - rnk = ssaRefRank(bb, i, v, SsaDef()) - 1 and - redef.definesAt(v, bb, i) - ) - } - /** * Same as `ssaRefRank()`, but restricted to a particular SSA definition `def`. */ diff --git a/ruby/ql/lib/codeql/ruby/frameworks/Files.qll b/ruby/ql/lib/codeql/ruby/frameworks/Files.qll index e42d34f06df..bbfb84219b4 100644 --- a/ruby/ql/lib/codeql/ruby/frameworks/Files.qll +++ b/ruby/ql/lib/codeql/ruby/frameworks/Files.qll @@ -191,10 +191,6 @@ module IO { // "Direct" `IO` instances, i.e. cases where there is no more specific // subtype such as `File` - private class IOInstanceStrict extends IOInstance { - IOInstanceStrict() { this = ioInstance() } - } - /** * A `DataFlow::CallNode` that reads data using the `IO` class. For example, * the `read` and `readline` calls in: