shift-op-parantheses and multiplication

Hello!

I wonder what you think about making -Wshift-op-parantheses warn about multiplicative operators also.

It currently warns about this:

    a = (b + 1 << 2);

I suggest that it will warn about this also:

    a = (b * 1 << 2);

Possibly with a separate ID so that warning can be suppressed if you think it's obvious that multiplication is calculated first.

I attach a proof-of-concept patch.

Best regards,
Daniel Marjamäki

..................................................................................................................
Daniel Marjamäki Senior Engineer
Evidente ES East AB Warfvinges väg 34 SE-112 51 Stockholm Sweden

Mobile: +46 (0)709 12 42 62
E-mail: Daniel.Marjamaki@evidente.se

www.evidente.se

160920-shift-op-parentheses.diff (2.35 KB)