[PATCH] D114521: [clang-format] [PR47936] AfterControlStatement: MultiLine breaks AllowShortFunctionsOnASingleLine
Kyrylo Bohdanenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 24 07:09:14 PST 2021
KyrBoh added a comment.
In D114521#3151431 <https://reviews.llvm.org/D114521#3151431>, @curdeius wrote:
> LGTM, but I have one question. You mentioned in the bug ticket comment that "this exposes a greater issue in AllowShortXXX". Have you found other cases that misbehave? If so, then it would probably be good to add them.
There also seems to be a behavior caused by AfterControlStatement = Multiline. This code:
if (condition) { contrinue; }
Is broken up into lines:
if (condition)
{
continue;
}
I am not sure if this is intended behavior or not.
Because when having this configuration:
BreakBeforeBraces: Custom
BraceWrapping:
AfterControlStatement: Never
AllowShortBlocksOnASingleLine: Always
AllowShortIfStatementsOnASingleLine: WithoutElse # any value except Never
clang-format would leave that code unchanged.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114521/new/
https://reviews.llvm.org/D114521
More information about the cfe-commits
mailing list