temporaryExpression

Coverity Documentation

Version
latest

Matches all locations where a temporary object is constructed.

This pattern only matches nodes of type expression.

Properties

temporaryExpression does not expose any new properties.

Inherits properties from:

Example

The following CodeXM pattern matches temporary constructions of collections:


CXM code follows
    pattern temporaryCollectionConstruction {
        temporaryExpression {
            .initializer = objectInitializer {
                .memberInitializers == addMemberInitializer
            }
        }
    };