Skip to content

Commit 64ac667

Browse files
owen-mcCopilot
andcommitted
Guards: bound implicit return SSA filtering
Use an empty default for relevantImplicitReturnSsaDefinition instead of the Cartesian product. Languages supporting implicit returns must provide a bounded implementation; Go already does. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e20c57a commit 64ac667

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎java/ql/lib/semmle/code/java/controlflow/Guards.qll‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ private module LogicInput_v3 implements GuardsImpl::LogicInputSig {
351351
predicate relevantImplicitReturnSsaDefinition(
352352
GuardsInput::NonOverridableMethod method, SsaDefinition def
353353
) {
354-
any()
354+
none()
355355
}
356356

357357
predicate rangeGuard(GuardsImpl::PreGuard guard, GuardValue val, Expr e, int k, boolean upper) {

‎shared/controlflow/codeql/controlflow/Guards.qll‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ module Make<
618618
default predicate relevantImplicitReturnSsaDefinition(
619619
NonOverridableMethod method, SsaDefinition def
620620
) {
621-
any()
621+
none()
622622
}
623623

624624
/**

0 commit comments

Comments
 (0)