Re: [cocci] Searching function implementations with variable declarations and statements?

Julia Lawall
2025-07-01T14:01:14Z

[-- Attachment #1: Type: text/plain, Size: 550 bytes --]

On Tue, 1 Jul 2025, Markus Elfring wrote:

> >> Another SmPL script example:
> >> @display3@
> >> statement s;
> >> identifier i;
> >> type t;
> >> @@
> >> t i;
> >> <+...
> >> *s
> >> ...+>
> > You don't need the +
>
> Would we occasionally like to show a “list” of statements (detailed control flow)?

What you like doesn't really matter in this case. The only thing that is
supported is when the list of statements is precisely the body of a {}.
There is no unit in the cfg that a metavariable can be mapped to in the
other cases.

julia