[PATCH] D140835: [clang-format] Improve UnwrappedLineParser::mightFitOnOneLine()
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 5 03:46:35 PST 2023
owenpan added a comment.
In D140835#4028257 <https://reviews.llvm.org/D140835#4028257>, @HazardyKnusperkeks wrote:
> In D140835#4023132 <https://reviews.llvm.org/D140835#4023132>, @owenpan wrote:
>
>> In D140835#4023080 <https://reviews.llvm.org/D140835#4023080>, @HazardyKnusperkeks wrote:
>>
>>> On second thought, shouldn't we test for removing the braces?
>>
>> Hmm. This patch including the added test case //is// for removing braces.
>
> Then replace `test` with `check`.
There is no `test` in my patch. What's `check`?
> I mean if we don't want to remove braces and the line than becomes to long, because we keep the brace. As far as I can see that could now happen right?
If `RemoveBracesLLVM` is false, the line is too long and will wrap. If `RemoveBracesLLVM` is true, the line will fit on a single line after the braces are removed, However, without this patch, the braces would be kept and the line would wrap. (See the linked issue in the summary.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140835/new/
https://reviews.llvm.org/D140835
More information about the cfe-commits
mailing list