[PATCH] D14484: Formatting constructor initializer lists by putting them always on different lines
Daniel Jasper via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 8 03:02:56 PST 2015
Please read
http://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options
Does your style option qualify?
On Sun, Nov 8, 2015 at 8:04 AM, JVApen <jvapen at gmail.com> wrote:
> JVApen created this revision.
> JVApen added a reviewer: djasper.
> JVApen added a subscriber: cfe-commits.
> JVApen set the repository for this revision to rL LLVM.
> Herald added a subscriber: klimek.
>
> Hi all,
>
> I've been playing around with the clang for a while now and really enjoy
> it. Unfortunately clang-format does not yet do what I like it to do, so I
> started hacking it. So here is my first successful attempt to get something
> working.
>
> The issue: ConstructorInitializerAllOnOneLineOrOnePerLine only works if
> 'If the constructor initializers don’t fit on a line', while I prefer it to
> always work. In other words, I use the following formatting:
>
> ```
> Constructor()
> : a(a)
> , b(b)
> ```
>
> Since everyone can benefit from upstreaming, I like to share my changes
> and get some feedback.
> Here is already some of the stuff which I was uncertain about:
>
> - Should I keep ConstructorInitializerAllOnOneLineOrOnePerLine or rename
> it (currently the second one)
> - How to name the values, currently: Compact (old: false), BestFit (old:
> true), OnePerLine (new)
> - Is the back-ward compatibility in ScalarEnumerationTraits a good idea?
> (On rename most likely not)
>
> JVApen
>
>
>
> Repository:
> rL LLVM
>
> http://reviews.llvm.org/D14484
>
> Files:
> docs/ClangFormatStyleOptions.rst
> include/clang/Format/Format.h
> lib/Format/ContinuationIndenter.cpp
> lib/Format/Format.cpp
> lib/Format/TokenAnnotator.cpp
> unittests/Format/FormatTest.cpp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151108/1f9fd2e6/attachment.html>
More information about the cfe-commits
mailing list