castOperator

Coverity Documentation

Version
latest

Matches implicit cast operations.

Python does not officially support cast operations, but this pattern is included because some Python interpreters do perform casting.

This pattern only matches nodes of type expression.

Properties

castOperator produces a record that contains the following property:

Name Type Description
operandExpression expression The expression whose type is being cast

Inherits properties from:

Example

The following CodeXM pattern matches a cast from an integer literal expression:

CXM code follows
    pattern castFromInt {
        castOperator {
            .operandExpression == integerLiteral
        }
    };