Bouska added a comment.

I have an issue with this change. Currently (at least for C++), the presence of 
a trailing comma is used as a formatting hint to put all the element in one 
line or one per line as below:

  enum test1 = {ONE, TWO, THREE};
  
  enum test2 = {
      ONE,
      TWO,
      THREE,
  };

As your change come after the formatting, clang-format won't be idempotent 
anymore. You are going to have the following if the container is bin packed (I 
did not actually test this):

  First run:  
  enum test1 = {
      ONE, TWO,
      THREE,};
  
  Second run:
  enum test1 = {
      ONE,
      TWO,
      THREE,
  };

So I definitely think this change should be done before formatting and not 
after.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73354/new/

https://reviews.llvm.org/D73354



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to