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

Class MakeCfgNodes::Nodes::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.internal.generated.CfgNodes

Direct supertypes

Predicates

getAnAttr

Gets any of the attrs of this match expression.

getAttr

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

getMatchArmList

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

getMatchExpr

Gets the underlying MatchExpr.

getNumberOfAttrs

Gets the number of attrs of this match expression.

getScrutinee

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

hasMatchArmList

Holds if getMatchArmList() exists.

hasScrutinee

Holds if getScrutinee() exists.

Inherited predicates

getAstNodefrom CfgNode
getExpr

Gets the underlying Expr.

from ExprCfgNode
getLocationfrom CfgNode
toStringfrom CfgNode

Charpred