Re: [cocci] Adjusting attributes for variables with SmPL?
Julia Lawall <[email protected]> Thu, 28 May 2026 10:09:55 +0200 (CEST)
| Newsgroups | fr.inria.cocci |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 28 May 2026, Markus Elfring wrote:
> >>> coccinelle.content = cocci.make_ident("__attribute__((myattr(\"" + x + "\"))) " + f)
> > You don't have to put the whole thing in content. Content could just make
> > the string, and then the replacement rule could have built the rest.
> Under which circumstances would a function call like make_attribute()
> become better supported?
> https://gitlab.inria.fr/coccinelle/coccinelle/-/blob/1bff7651118fc65c269dd8dba7f7d4a30fbc72c7/docs/Coccilib.3cocci#L154-159
Probably when someone is motivated to implement it. But there is no
motivation to implement it here. The only goal is to put a metavariable
in a string. We can fix the fresh identifier string problem, but since
python works well enough, that's also fine.
julia
>
> Regards,
> Markus
>