From: René Scharfe Date: Sun, 1 Oct 2017 15:12:08 +0000 (+0200) Subject: coccinelle: remove parentheses that become unnecessary X-Git-Tag: v2.15.0-rc0~6^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/9ca356fa8b9843b6565a3620f20c7538c1966c7f?hp=9ca356fa8b9843b6565a3620f20c7538c1966c7f coccinelle: remove parentheses that become unnecessary 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: Rene Scharfe Signed-off-by: Junio C Hamano ---