[PATCH] D14484: [clang-format] Formatting constructor initializer lists by putting them always on different lines
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 1 01:12:45 PDT 2019
MyDeveloperDay requested changes to this revision.
MyDeveloperDay added a comment.
This revision now requires changes to proceed.
Looking at this I'm wondering if this Isn't at least partially handled by the `BreakConstructorInitializersStyle` in combination with `ConstructorInitializerAllOnOneLineOrOnePerLine` style?
I can't be exactly sure but I think BreakConstructorInitializersStyle didn't exist before 2017 D32479: clang-format: Introduce BreakConstructorInitializers option <https://reviews.llvm.org/D32479> when this original patch was submitted
BreakConstructorInitializers: BeforeComma
ConstructorInitializerAllOnOneLineOrOnePerLine: true
SomeClass::Constructor() : aaaaaa(aaaaaaa), bbbbbb(bbbbbbb), cc(cc) {}
SomeClass::Constructor()
: aaaaaa(aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaa)
, bbbbbb(bbbbbbb)
, cc(cc) {}
BreakConstructorInitializers: BeforeComma
ConstructorInitializerAllOnOneLineOrOnePerLine: false
SomeClass::Constructor()
: aaaaaa(aaaaaaa)
, bbbbbb(bbbbbbb)
, cc(cc) {}
SomeClass::Constructor()
: aaaaaa(aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaa)
, bbbbbb(bbbbbbb)
, cc(cc) {}
At least the unit tests appear to be covered by using those styles?
Nit: At a minimum, this patch would need to be rebased and be a full context diff, can anyone see a use case that can't be covered with what we have?
Moving to "request changes" (really request to abandon if not necessary any longer)
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D14484/new/
https://reviews.llvm.org/D14484
More information about the cfe-commits
mailing list