• R
    coccinelle: remove parentheses that become unnecessary · 9ca356fa
    René Scharfe 提交于
    Transformations that hide multiplications can end up with an pair of
    parentheses that is no longer needed.  E.g. with a rule like this:
    
      @@
      expression E;
      @@
      - E * 2
      + double(E)
    
    ... we might get a patch like this:
    
      -	x = (a + b) * 2;
      +	x = double((a + b));
    
    Add a pair of parentheses to the preimage side of such rules.
    Coccinelle will generate patches that remove them if they are present,
    and it will still match expressions that lack them.
    Signed-off-by: NRene Scharfe <l.s.r@web.de>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    9ca356fa
array.cocci 777 字节