CodeQL library for Rust
codeql/rust-all 0.1.11 (changelog, source)
Search

Class MatchExprCfgNode

A match expression. For example:

match x {
    Option::Some(y) => y,
    Option::None => 0,
}
match x {
    Some(y) if y != 0 => 1 / y,
    _ => 0,
}

Import path

import codeql.rust.controlflow.CfgNodes

Direct supertypes

Indirect supertypes

Predicates

getArmExpr

Gets the expression of the ith match arm, if it exists.

getArmGuard

Gets the guard of the ith match arm, if it exists.

getArmPat

Gets the pattern of the ith match arm, if it exists.

Inherited predicates

getAPredecessor

Gets an immediate predecessor, if any.

from NodeImpl
getAPredecessor

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

from NodeImpl
getASplit

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

from AstCfgNodeImpl
getASuccessor

Gets an immediate successor, if any.

from NodeImpl
getASuccessor

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

from NodeImpl
getAnAttr

Gets any of the attrs of this match expression.

from MatchExprCfgNode
getAstNode

Gets the AST node that this node corresponds to, if any.

from AstCfgNodeImpl
getAttr

Gets the indexth attr of this match expression (0-based).

from MatchExprCfgNode
getExpr

Gets the underlying Expr.

from ExprCfgNode
getLocation

Gets the location of this control flow node.

from AstCfgNodeImpl
getMatchArmList

Gets the match arm list of this match expression, if it exists.

from MatchExprCfgNode
getMatchExpr

Gets the underlying MatchExpr.

from MatchExprCfgNode
getNumberOfAttrs

Gets the number of attrs of this match expression.

from MatchExprCfgNode
getScope

Gets the scope of this node.

from NodeImpl
getScrutinee

Gets the scrutinee (the expression being matched) of this match expression, if it exists.

from MatchExprCfgNode
getSplitsString

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

from AstCfgNodeImpl
hasMatchArmList

Holds if getMatchArmList() exists.

from MatchExprCfgNode
hasScrutinee

Holds if getScrutinee() exists.

from MatchExprCfgNode
isBranch

Holds if this node has more than one successor.

from NodeImpl
isCondition

Holds if this control flow node has conditional successors.

from NodeImpl
isJoin

Holds if this node has more than one predecessor.

from NodeImpl
toString

Gets a textual representation of this control flow node.

from AstCfgNodeImpl

Charpred