From 3b3f4bc7829b0b06254d37b040a4cb3ab7433dd6 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Tue, 29 Jul 2025 15:20:35 +0200 Subject: [PATCH] Java/Guards: Remove unused. --- java/ql/lib/semmle/code/java/controlflow/Guards.qll | 6 ------ shared/controlflow/codeql/controlflow/Guards.qll | 12 ------------ 2 files changed, 18 deletions(-) diff --git a/java/ql/lib/semmle/code/java/controlflow/Guards.qll b/java/ql/lib/semmle/code/java/controlflow/Guards.qll index c33658cb67b..778ebe6e878 100644 --- a/java/ql/lib/semmle/code/java/controlflow/Guards.qll +++ b/java/ql/lib/semmle/code/java/controlflow/Guards.qll @@ -490,12 +490,6 @@ module Guards_v2 = GuardsImpl::Logic; /** INTERNAL: Don't use. */ module Guards_v3 = GuardsImpl::Logic; -/** INTERNAL: Don't use. */ -predicate implies_v3(Guard g1, boolean b1, Guard g2, boolean b2) { - Guards_v3::boolImplies(g1, any(GuardValue v | v.asBooleanValue() = b1), g2, - any(GuardValue v | v.asBooleanValue() = b2)) -} - /** * A guard. This may be any expression whose value determines subsequent * control flow. It may also be a switch case, which as a guard is considered diff --git a/shared/controlflow/codeql/controlflow/Guards.qll b/shared/controlflow/codeql/controlflow/Guards.qll index 7a643fce9e7..ab500456058 100644 --- a/shared/controlflow/codeql/controlflow/Guards.qll +++ b/shared/controlflow/codeql/controlflow/Guards.qll @@ -935,18 +935,6 @@ module Make Input> { } } - private predicate booleanGuard(Guard guard, GuardValue val) { - exists(guard) and exists(val.asBooleanValue()) - } - - private module BooleanImplies = ImpliesTC; - - /** INTERNAL: Don't use. */ - predicate boolImplies(Guard g1, GuardValue v1, Guard g2, GuardValue v2) { - BooleanImplies::guardControls(g2, v2, g1, v1) and - g2 != g1 - } - /** * Holds if `guard` evaluating to `v` implies that `e` is guaranteed to be * null if `isNull` is true, and non-null if `isNull` is false.