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

Vassil Vassilev via cfe-dev cfe-dev at lists.llvm.org
Tue Apr 4 02:30:03 PDT 2017


Hi Richard,

   Could you submit the patch in http://reviews.llvm.org/ 
(http://llvm.org/docs/Phabricator.html)

   I think there it will get more attention.

Cheers, Vassil
On 03/04/17 18:12, Richard Bradfield via cfe-dev wrote:
> 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?
>
> Cheers,
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170404/5b7ed7d9/attachment.html>


More information about the cfe-dev mailing list