From 99b5cecb18efb0544d31adcb8cf490ba89a2de1b Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 28 Apr 2026 10:32:53 +0200 Subject: [PATCH] Java: Adapt to changes in shared CFG library --- java/ql/lib/semmle/code/java/ControlFlowGraph.qll | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/java/ql/lib/semmle/code/java/ControlFlowGraph.qll b/java/ql/lib/semmle/code/java/ControlFlowGraph.qll index 1137b46f32c..a1e071df10c 100644 --- a/java/ql/lib/semmle/code/java/ControlFlowGraph.qll +++ b/java/ql/lib/semmle/code/java/ControlFlowGraph.qll @@ -57,6 +57,15 @@ private module Ast implements AstSig { AstNode callableGetBody(Callable c) { result = c.getBody() } + // TODO: Implement in order to include parameters in the CFG + class Parameter extends AstNode { + Parameter() { none() } + + Expr getDefaultValue() { none() } + } + + Parameter callableGetParameter(Callable c, int i) { result = c.getParameter(i) } + class Stmt = J::Stmt; class Expr = J::Expr; @@ -534,7 +543,7 @@ private module Input implements InputSig1, InputSig2 { l = TYield() and n instanceof SwitchExpr } - class CallableBodyPartContext = Void; + class CallableContext = Void; predicate inConditionalContext(Ast::AstNode n, ConditionKind kind) { kind.isBoolean() and