Contenuto principale

Cpp.CompoundLiteralExpression Class

Namespace: Cpp
Superclasses: AstNodeProperties

Represents the compound_literal_expression nodes in the syntax tree of your code

Since R2026a

Description

The PQL class CompoundLiteralExpression represents the node compound_literal_expression in the syntax tree of your code.

struct S { int x, y; };
void demo() {
    S a = (S){1, 2};
    S b = (S){ .x = 3, .y = 4 }; // GNU extension-style compound literals
}

The two initializer expressions (S){1, 2} and (S){ .x = 3, .y = 4 } correspond to compound_literal_expression nodes matched by the CompoundLiteralExpression PQL class.

Predicates

expand all

Version History

Introduced in R2026a