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

Class GuardedControlFlowNode

A guarded control flow node. A guarded control flow node is like a guarded expression (GuardedExpr), except control flow graph splitting is taken into account. That is, one control flow node belonging to an expression may be guarded, while another split need not be guarded:

if (b)
    if (x == null)
        return;
x.ToString();
if (b)
    ...

In the example above, the node for x.ToString() is null-guarded in the split b == true, but not in the split b == false.

Import path

import semmle.code.csharp.controlflow.Guards

Direct supertypes

Indirect supertypes

Predicates

getAGuard

Gets an expression that guards this control flow node. That is, this control flow node is only reached when the returned expression has abstract value v.

mustHaveValue

Holds if this control flow node must have abstract value v. That is, this control flow node is guarded by a structurally equal expression having abstract value v.

Inherited predicates

dominates

Holds if this node dominates that node.

from Node
getAFalseSuccessor

Gets an immediate false successor, if any.

from Node
getAPredecessor

Gets an immediate predecessor, if any.

from Node
getAPredecessorByType

Gets an immediate predecessor node of a given flow type, if any.

from Node
getASplit

Gets a split for this control flow node, if any.

from ElementNode
getASuccessor

Gets an immediate successor, if any.

from Node
getASuccessorByType

Gets a successor node of a given type, if any.

from Node
getATrueSuccessor

Gets an immediate true successor, if any.

from Node
getBasicBlock

Gets the basic block that this control flow node belongs to.

from Node
getElement

Gets the control flow element that this node corresponds to, if any.

from ElementNode
getEnclosingCallable

Gets the enclosing callable of this control flow node.

from Node
getLocation

Gets the location of this control flow node.

from Node
getSplitsString

Gets a comma-separated list of strings for each split in this node, if any.

from ElementNode
isBranch

Holds if this node has more than one successor.

from Node
isCondition

Holds if this control flow node has conditional successors.

from Node
isJoin

Holds if this node has more than one predecessor.

from Node
postDominates

Holds if this node post-dominates that node.

from Node
strictlyDominates

Holds if this node strictly dominates that node.

from Node
strictlyPostDominates

Holds if this node strictly post-dominates that node.

from Node
toString

Gets a textual representation of this control flow node.

from ElementNode

Charpred