mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
use manual recursion in Refinements::inGuard
This commit is contained in:
@@ -324,7 +324,11 @@ class VarRefinementContext extends RefinementContext, TVarRefinementContext {
|
||||
}
|
||||
|
||||
/** Holds if `e` is nested inside a guard node. */
|
||||
private predicate inGuard(Expr e) { e.getParentExpr*() = any(GuardControlFlowNode g).getTest() }
|
||||
private predicate inGuard(Expr e) {
|
||||
e = any(GuardControlFlowNode g).getTest()
|
||||
or
|
||||
inGuard(e.getParentExpr())
|
||||
}
|
||||
|
||||
/**
|
||||
* An abstract value of a refinement expression.
|
||||
|
||||
Reference in New Issue
Block a user