[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 17 01:14:16 PDT 2024
================
@@ -128,25 +128,6 @@ static bool startsSegmentOfBuilderTypeCall(const FormatToken &Tok) {
return Tok.isMemberAccess() && Tok.Previous && Tok.Previous->closesScope();
}
-// Returns \c true if \c Current starts a new parameter.
-static bool startsNextParameter(const FormatToken &Current,
- const FormatStyle &Style) {
- assert(Current.Previous);
- const auto &Previous = *Current.Previous;
- if (Current.is(TT_CtorInitializerComma) &&
- Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma) {
- return true;
- }
- if (Style.Language == FormatStyle::LK_Proto && Current.is(TT_SelectorName))
- return true;
- return Previous.is(tok::comma) && !Current.isTrailingComment() &&
- ((Previous.isNot(TT_CtorInitializerComma) ||
- Style.BreakConstructorInitializers !=
- FormatStyle::BCIS_BeforeComma) &&
- (Previous.isNot(TT_InheritanceComma) ||
- Style.BreakInheritanceList != FormatStyle::BILS_BeforeComma));
-}
-
----------------
owenca wrote:
There's no need to move it to `FormatToken.h`.
https://github.com/llvm/llvm-project/pull/101882
More information about the cfe-commits
mailing list