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

Tobias Grosser tobias at grosser.es
Mon Nov 3 07:46:17 PST 2014


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.




More information about the cfe-commits mailing list