[PATCH] D79325: [clang-format] [PR42164] Add Option to Break before While
Krasimir Georgiev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 6 11:52:50 PDT 2020
krasimir marked an inline comment as done.
krasimir added inline comments.
================
Comment at: clang/lib/Format/Format.cpp:691
+ /*SplitEmptyRecord=*/true,
+ /*SplitEmptyNamespace=*/true};
switch (Style.BreakBeforeBraces) {
----------------
Awesome!
================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2170
parseBlock(/*MustBeDeclaration=*/false);
- if (Style.BraceWrapping.IndentBraces)
+ if (Style.BraceWrapping.IndentBraces || Style.BraceWrapping.BeforeWhile)
addUnwrappedLine();
----------------
Why not remove `Style.BraceWrapping.IndentBraces`?
- should be a no-op for GNU style,
- other styles don't IndentBraces,
- we can add a sentence in the release notes that previously IndentBraces implied the new "BeforeWhile" option, and now you just have to set it if you're using a custom GNU-like style.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79325/new/
https://reviews.llvm.org/D79325
More information about the cfe-commits
mailing list