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

Module Input

Import path

import csharp

Predicates

beginAbruptCompletion

Holds if ast may result in an abrupt completion c originating at n. The boolean always indicates whether the abrupt completion always occurs or whether n may also terminate normally.

callableGetBodyPart

Gets the indexth part of the body of c in context ctx. The indices do not need to be consecutive nor start from a specific index.

callableGetParameter

Gets the indexth parameter of c in context ctx. The indices do not need to be consecutive nor start from a specific index.

catchAll

Holds if catch clause catch catches all exceptions.

cfgCachedStageRef

Reference to the cached stage of the control flow graph. Should be instantiated with CfgCachedStage::ref().

endAbruptCompletion

Holds if an abrupt completion c from within ast is caught with flow continuing at n.

hasLabel

Holds if the node n has the label l. For example, a label in a goto statement or a goto target.

inConditionalContext

Holds if n is in a conditional context of kind kind. For example, the left-hand side of a short-circuiting && expression is in a boolean conditional context.

matchAll

Holds if case c matches all possible values, for example, if it is a default case or a match-all pattern like Object o or if it is the final case in a switch that is known to be exhaustive.

postOrInOrder

Holds if n is executed in post-order or in-order. This means that an additional node is created to represent n in the control flow graph. Otherwise, n is represented by the “before” node.

step

Holds if there is a local non-abrupt step from n1 to n2.

Classes

Label

A label used for matching jump sources and targets, for example in goto statements.