caseStatement

Coverity Documentation

Version
latest

Matches individual case statements.

This pattern only matches nodes of type statement.

Properties

caseStatement produces a record that contains the following property:

Name Type Description
valueExpression expression The value associated with the case.

Inherits properties from:

Example

The following CodeXM pattern matches all case statements that are for the integer value 1:

CXM code follows
    pattern caseOne {
        caseStatement {
            .valueExpression == integerLiteral { .value == 1 }
        }
    }

See Also

matchStatement