主要内容

Cpp.ReturnStatement Class

Namespace: Cpp
Superclasses: AstNodeProperties

Represents the return_statement nodes in the syntax tree of your code

Since R2026a

Description

The PQL class Cpp.ReturnStatement represents the node return_statement in the syntax tree of your code.

#include <vector>

int scalar() {
    return 42;
}

int comma_expr() {
    int a = 0, b = 0;
    return (a++, b++);
}

std::vector<int> vec() {
    return {1, 2, 3};
}

The examples show three return statements. Each of these is return_statement node matched by Cpp.ReturnStatement.

Predicates

expand all

Version History

Introduced in R2026a