r221125 - clang-format: [Java] Allow trailing semicolons after enums.

Daniel Jasper djasper at google.com
Mon Nov 3 07:53:33 PST 2014


Reverted in r221158. I think just removing the semicolon should be good in
almost all cases. We can reconsider later if that proves to be wrong.

On Mon, Nov 3, 2014 at 4:46 PM, Tobias Grosser <tobias at grosser.es> wrote:

> On 03.11.2014 04:00, Daniel Jasper wrote:
>
>> Author: djasper
>> Date: Sun Nov  2 21:00:42 2014
>> New Revision: 221125
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=221125&view=rev
>> Log:
>> clang-format: [Java] Allow trailing semicolons after enums.
>>
>> Before:
>>    enum SomeThing { ABC, CDE }
>>    ;
>>
>> After:
>>    enum SomeThing { ABC, CDE };
>>
>
> This change seems to cause regressions on C/C++ code.
>
> clang-format-trunk
> --------------------------------
> enum TestEnum { A, B }; typedef int L;
> enum TestEnum2 {
>   D,
>   C
> };
>
>     /// Hallo
>     class P {
> public:
>   int foo();
> };
>
> class B {
>   enum TestEnum3 { X, Y }; public : int foo();
> };
> --------------------------------
>
>
> clang-format-3.5
> --------------------------
> enum TestEnum { A, B };
> typedef int L;
> enum TestEnum2 { D, C };
>
> /// Hallo
> class P {
> public:
>   int foo();
> };
>
> class B {
>   enum TestEnum3 { X, Y };
>
> public:
>   int foo();
> };
> ------
>
> This change is visible on the Polly code base as well. For now I disabled
> the syntax check to silence the buildbots such that we can
> have a look at this without being pressured.
>
> Cheers,
> Tobias
>
> P.S.: Thanks for the clang-format library dependency removal, bisecting
> this was quick and easy.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141103/4b892487/attachment.html>


More information about the cfe-commits mailing list