clang-format: Incorrectly splitting Java logical shift assignment [Patch]

Hi all,

I noticed when trying to use clang-format on a large Java codebase that
it mangles logical shift assignment operators.
(That is `>>>=` and `<<<=`)

clang-format incorrectly splits them into two operators, causing a
compile error after reformatting.

public class Minimal {
   public void func(String args) {
     int i = 42;
- i >>>= 1;
+ i >> >= 1;
     return i;

Attached is a patch which fixes this, I'm mailing here first for
feedback, since this would be my first contribution to the LLVM project,
and I'm not completely certain of the etiquette for posting to the
commit list or Phabricator.

Does this look suitable?


0001-clang-format-Recognize-Java-logical-shift-assign-oper.patch (4.8 KB)

Hi Richard,

   Could you submit the patch in (

   I think there it will get more attention.

Cheers, Vassil

And done: