[PATCH] D54628: Extend format with AllowShortEnumsOnASingleLine option

2019-11-14 Thread Florian Kauer via Phabricator via cfe-commits
koalo updated this revision to Diff 229298. koalo added a comment. Rebased to current master CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54628/new/ https://reviews.llvm.org/D54628 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Format/Format.h clang/lib/Format

[PATCH] D54628: Extend format with AllowShortEnumsOnASingleLine option

2019-11-14 Thread Florian Kauer via Phabricator via cfe-commits
koalo added a comment. Yes, that is at least my understanding. I just rebased to master. In my understanding, "short" means "put it on a single line if it fits considering the current maximum line length". CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54628/new/ https://reviews.llvm.o

[PATCH] D54628: Extend format with AllowShortEnumsOnASingleLine option

2019-11-13 Thread Florian Kauer via Phabricator via cfe-commits
koalo added a comment. Yes it does not. Therefore, I have followed the same pattern as the the other AllowShort* options. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54628/new/ https://reviews.llvm.org/D54628 ___

[PATCH] D54628: Extend format with AllowShortEnumsOnASingleLine option

2019-11-13 Thread Florian Kauer via Phabricator via cfe-commits
koalo added a comment. The difference is that BraceWrapping.AfterEnum also wraps before the brace. With AfterEnum we have the following true: enum X : int { B }; false: enum X : int { B }; But what I want is this: enum X : int { B }; Repository: rC Clang CHANGES

[PATCH] D54628: Extend format with AllowShortEnumsOnASingleLine option

2019-11-13 Thread Florian Kauer via Phabricator via cfe-commits
koalo added a comment. In D54628#1742781 , @MyDeveloperDay wrote: > sorry searching through old issues, are you still interested in this patch? Yes, would be nice to have either this or an equivalent possibility that implements the same feature. Repo

[PATCH] D54628: Extend format with AllowShortEnumsOnASingleLine option

2018-11-16 Thread Florian Kauer via Phabricator via cfe-commits
koalo created this revision. koalo added reviewers: djasper, rsmith. Herald added a subscriber: cfe-commits. Before, clang-format has tried to put enums on a single line whenever possible (unless in styles where the opening brace was put on a seperate line anyway). AllowShortEnumsOnASingleLine th