CodeQL library for C#
codeql/csharp-all 0.6.1 ( changelog , source )

Member predicate GuardedExpr :: isGuardedBy

Holds if this expression is guarded by expression cond, which must evaluate to b. The expression sub is a sub expression of cond that is structurally equal to this expression.

In case this expression or sub accesses an SSA variable in its left-most qualifier, then so must the other (accessing the same SSA variable).

predicate isGuardedBy ( Expr cond , Expr sub , boolean b )