>> Now I would like to support more possibilities for the determination >> of affected members from the shown variable. >> >> >> @show_modification_before_memory_release@ >> expression element, value; >> identifier var; >> @@ >> <+... >> *var->element = value; > > Element is not an expression. An expression is something that has a value. > A field name has no value. It just enables selecting a field.
Thanks for your clarification. > Probably what you want is <+...var->element...+>, ie something that has > var->element as a subexpression. * Do I need to restrict the amount of source code which can appear between data structure access and the shown value assignment that should be checked by such a SmPL construct? * Do I need to fiddle with another SmPL disjunction to express the possibility that "var" could be more than a simple identifier? * How should the support for longer arrow chains be specified? > To avoid parsing ambiguities, you will need to put () around this, > but it will not affect the results. Thanks for this hint. >> ...+> >> free(var); Regards, Markus _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
