On Tue, 9 Oct 2018, Timur Tabi wrote:
> In my cocci script, I have several rules, only one of which will
> match. I then have a bunch of other rules that should be run only if
> one of the first rules is run. So I have something like this:
>
> @rule1@
> @@
> ...
>
> @rule2@
> @@
> ...
>
> @rule3@
> @@
> ...
>
> @depends on rule1 || rule2 || rule3@
> ...
>
> @depends on rule1 || rule2 || rule3@
> ...
>
> How can I create a dummy rule so that I can do something like this:
>
> @rule1@
> @@
> ...
>
> @rule2@
> @@
> ...
>
> @rule3@
> @@
> ...
>
> @depends on rule1 || rule2 || rule3@
> @dummy@
> ...
@dummy depends on rule1 || rule2 || rule3@
I guess that the problem is that you have to give dummy a pattern that
will always match. Maybe something generic that matches a function would
do? Or something generic that has the form of what is matched in rule1
rule2 and rule3.
julia
>
> @depends on dummy@
> ...
>
> @depends on dummy@
> ...
> _______________________________________________
> Cocci mailing list
> [email protected]
> https://systeme.lip6.fr/mailman/listinfo/cocci
>
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci