Files
codeql/java/ql/test/library-tests/guards/guardslogic.ql
2026-02-23 15:09:52 +01:00

11 lines
364 B
Plaintext

import java
import semmle.code.java.controlflow.Guards
import utils.test.BasicBlock
from Guard g, BasicBlock bb, GuardValue gv
where
g.valueControls(bb, gv) and
g.getEnclosingCallable().getDeclaringType().hasName("Logic") and
(exists(gv.asBooleanValue()) or gv.isThrowsException() or gv.getDualValue().isThrowsException())
select g, gv, getFirstAstNode(bb)