On Wed, 29 Oct 2014, SF Markus Elfring wrote:

> > However, I fail to assemble those two patches in a single concise one.
>
> How do you think about the following approach?
>
> @Add_before_declaration@
> identifier func;
> type t;
> @@
> (
>  #define func BAR(func)
>  t func(...);
> |
> +#define func BAR(func)
>  t func(...);
> )
>
> @Add_before_implementation@
> identifier func;
> type t;
> @@
> (
>  #define func BAR(func)
>  t func(...)
>  { ... }
> |
> +#define func BAR(func)
>  t func(...)
>  { ... }
> )

This doesn't work.  There is no kind of disjunction that includes a
function definition in a branch.

julia

>
>
> Do you need to express a detailed adjustment precondition for a safer semantic
> patch?
>
> Regards,
> Markus
> _______________________________________________
> Cocci mailing list
> [email protected]
> https://systeme.lip6.fr/mailman/listinfo/cocci
>
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to