On Fri, 22 Nov 2019, Markus Elfring wrote:

> Hello,
>
> The semantic patch language supports source code searches also for uses
> of specific data types. Such restricted searches can occasionally be nice.
> But we would like to find more software variations often enough.
> The consequence is that metavariables of the kind “expression” will usually
> be applied. But it becomes uncertain then to which data types the found
> expressions will be resolved finally.
>
> We would like to achieve considerably safe software transformations.
> Use cases occur then where the correct application of data types
> is essential. (The introduction of false positives is undesirable here.)
>
> How much can SmPL scripts help for corresponding changes?

You can specify the type of an expression rather than just expression.

The ability of Coccinlle to find the types depends on whether header files
are needed and whether Coccinelle can find those header files.

If a type is specified and Coccinelle cannot detetermine that an
expression has the required type, the match will fail.

julia
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to