MarcusJohnson91 added a comment.

In D93938#2832825 <https://reviews.llvm.org/D93938#2832825>, @Userbla wrote:

> I applied this fix locally to a branch based off llvm 11.x and the 
> `FormatTest.FormatsTypedefEnum` test now fails.

I'm running into this bug too.

  typedef enum Blah {
      One = 1,
  } Blah;

becomes

  typedef enum Blah
  {
      One = 1,
  } Blah;

with BraceWrapping.AfterEnum set to true or false, and 
AllowShortEnumsOnASingleLine set to false; but with 
AllowShortEnumsOnASingleLine set to true and BraceWrapping.AfterEnum set to 
true it works.

Only problem is, I never want short enums to be on a single line.

----

I feel like I ran into a similar bug when I contributed the patch to add 
BraceWrapping.AfterExternBlock; something else I don't recall off the top of my 
head, was messing with that setting too.

and the solution was to add an if statement around that call to 
addUnwrappedLine().


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93938

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D93938: [clang-form... Marcus Johnson via Phabricator via cfe-commits

Reply via email to