Guards/Java: Use BasicBlock signature in Guards library.

This commit is contained in:
Anders Schack-Mulligen
2025-08-20 11:30:37 +02:00
parent a7b2a2fa9f
commit 3821f172df
2 changed files with 20 additions and 66 deletions

View File

@@ -139,20 +139,17 @@ private predicate isNonFallThroughPredecessor(SwitchCase sc, ControlFlowNode pre
)
}
private module GuardsInput implements SharedGuards::InputSig<Location> {
private module SuccessorTypes implements SharedGuards::SuccessorTypesSig<SuccessorType> {
import SuccessorType
}
private module GuardsInput implements SharedGuards::InputSig<Location, ControlFlowNode, BasicBlock> {
private import java as J
private import semmle.code.java.dataflow.internal.BaseSSA
private import semmle.code.java.dataflow.NullGuards as NullGuards
import SuccessorType
class ControlFlowNode = J::ControlFlowNode;
class NormalExitNode = ControlFlow::NormalExitNode;
class BasicBlock = J::BasicBlock;
predicate dominatingEdge(BasicBlock bb1, BasicBlock bb2) { J::dominatingEdge(bb1, bb2) }
class AstNode = ExprParent;
class Expr = J::Expr;
@@ -382,7 +379,7 @@ private module GuardsInput implements SharedGuards::InputSig<Location> {
}
}
private module GuardsImpl = SharedGuards::Make<Location, GuardsInput>;
private module GuardsImpl = SharedGuards::Make<Location, Cfg, SuccessorTypes, GuardsInput>;
private module LogicInputCommon {
private import semmle.code.java.dataflow.NullGuards as NullGuards