To set all bits,~0 is often used.
x.y = ~0;
and to set all bits except (1<<A) this is often used:
x.y = ~(1 << A);
.. do not warn about these.
I think it might make sense to warn about the opposite:
x.y = ~0xffffffff;
But that is a possible false negative for now.
I believe this is somewhat related to r277796.