labeledBreakStatement

Coverity Documentation

Version
latest

Matches break statements that target a label.

This pattern only matches nodes of type statement.

Properties

labeledBreakStatement produces a record that contains the following properties:

Name Type Description
controlStatement statement The flow-of-control statement within which the break occurs; for example, while or switch
target statement The label to break to

Inherits properties from:

Example

The following CodeXM pattern matches a break statement that targets the label outer:


CXM code follows
    pattern outerBreak {
        labeledBreakStatement {
            .target == labelStatement { .nameString == "outer" }
        }
    };