A guard. This may be any expression whose value determines subsequent control flow. It may also be a switch case, which as a guard is considered to evaluate to either true or false depending on whether the case matches.
Import path
import codeql.controlflow.GuardsDirect supertypes
Predicates
| directlyControls | Holds if this guard evaluating to |
| directlyValueControls | Holds if this guard evaluating to |
| getBasicBlock | Gets the basic block of this guard. For expressions, this is the basic block of the expression itself, and for switch cases, this is the basic block of the expression being compared against the cases. |
| hasBranchEdge | Holds if this guard is the last node in |
| hasValueBranchEdge | Holds if this guard evaluating to |
| isEquality | Holds if this guard tests equality between |
Inherited predicates
| getLocation | Gets the location of this AST node. | from AstNode |
| toString | Gets a textual representation of this AST node. | from AstNode |