[all-commits] [llvm/llvm-project] 7a38b3: [clang-format] Respect ColumnLimit 0 line breaks i...
Emilia Kond via All-commits
all-commits at lists.llvm.org
Fri Jun 23 07:35:21 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7a38b3bfeb5623fb970a03ed9f295288802f4506
https://github.com/llvm/llvm-project/commit/7a38b3bfeb5623fb970a03ed9f295288802f4506
Author: Emilia Kond <emilia at rymiel.space>
Date: 2023-06-23 (Fri, 23 Jun 2023)
Changed paths:
M clang/lib/Format/ContinuationIndenter.cpp
M clang/unittests/Format/FormatTest.cpp
Log Message:
-----------
[clang-format] Respect ColumnLimit 0 line breaks in inline asm
Previously, using ColumnLimit: 0 with extended inline asm with the
BreakBeforeInlineASMColon: OnlyMultiline option (the default style),
the formatter would act as if in Always mode, meaning a line break was
added before every colon in an extended inline assembly block.
This patch respects the already existing line breaks, and doesn't add
any new ones, if in ColumnLimit 0 mode.
Behaviour with Always stays as expected, with a break before every colon
regardless of any existing line breaks.
Behaviour with Never was broken before, and remains broken with this patch,
it is just never respected in ColumnLimit 0 mode.
Fixes https://github.com/llvm/llvm-project/issues/62754
Reviewed By: HazardyKnusperkeks, owenpan
Differential Revision: https://reviews.llvm.org/D150848
More information about the All-commits
mailing list