У меня есть следующий код:
return first_long_function_name(argument) ||
second_long_function_name(argument) || third_long_function_name(argument);
Я хочу, чтобы он вёл себя как BinPackParameters=false, и если он не помещается в одну строку, каждое предложение должно быть в отдельной строке. Есть ли способ это сделать?
return first_long_function_name(argument) ||
second_long_function_name(argument) ||
third_long_function_name(argument);
Мой файл в формате .clang выглядит следующим образом:
# See https://clang.llvm.org/docs/ClangFormat ... tions.html for all options
Language: Cpp
# Spaces
ColumnLimit: 120
IndentWidth: 4
AccessModifierOffset: -4
IndentAccessModifiers: false
NamespaceIndentation: None
IndentCaseLabels: true
AlwaysBreakTemplateDeclarations: Yes
SpaceAfterTemplateKeyword: false
# Function calls
AlignAfterOpenBracket: Align
BinPackParameters: false
BinPackArguments: false
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
# Curly Braces
BreakBeforeBraces: Custom
BraceWrapping:
AfterFunction: true
AfterControlStatement: Never
InsertBraces: true
# Variables
PointerAlignment: Right
# Short lines
AllowShortEnumsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortBlocksOnASingleLine: Empty
# Comments
ReflowComments: false
# Includes
SortIncludes: Never
ForEachMacros: ['LOOP', 'LOOP_FROM', 'LOOP_TYPE', 'LOOP_FROM_TYPE']
PenaltyReturnTypeOnItsOwnLine: 1000
Подробнее здесь: https://stackoverflow.com/questions/791 ... -variables