主要内容

Cpp.GnuAsmExpression Class

Namespace: Cpp
Superclasses: AstNodeProperties

Represents the gnu_asm_expression nodes in the syntax tree of your code

Since R2026a

Description

The PQL class Cpp.GnuAsmExpression represents the node gnu_asm_expression in the syntax tree of your code.

void foo(int input, int result) {
  asm("mov %0, %1" : "=r"(result) : "r"(input) : "memory");
  asm volatile("nop");
  asm goto("jmp %l0" : : : : mylabel);
mylabel:
  return;
}

The example contains three GNU inline-assembly expressions and each asm(...) occurrence corresponds to a gnu_asm_expression node matched by Cpp.GnuAsmExpression.

Predicates

expand all

Version History

Introduced in R2026a