Разрыв после оператора = (в формате clang - PullRequest
0 голосов
/ 18 декабря 2018

Я использую clang-формат из LLVM 7.0.0 с Windows 10 в C ++.

У меня следующий класс

class FooooooooooooooooooC
{
public:
   FooooooooooooooooooC() = default;
   const FooooooooooooooooooC& operator=( const FooooooooooooooooooC& ) = delete;

};

, и после запуска clang-формата он должен выглядеть так:

class FooooooooooooooooooC
{
public:
   FooooooooooooooooooC() = default;
   const FooooooooooooooooooC& operator=(
      const FooooooooooooooooooC& ) = delete;

};

Но на самом деле он выглядит так после запуска clang-формата

class FooooooooooooooooooC
{
public:
   FooooooooooooooooooC() = default;
   const FooooooooooooooooooC& 
   operator=( const FooooooooooooooooooC& ) = delete;

};

Мои настройки clang-fromat в формате .clang:

---
AccessModifierOffset: -3
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BraceWrapping:   
  AfterClass:            true
  AfterControlStatement: true
  AfterEnum:             true
  AfterFunction:         true
  AfterNamespace:        true
  AfterObjCDeclaration:  true
  AfterStruct:           true
  AfterUnion:            true
  AfterExternBlock:      true
  BeforeCatch:           true
  BeforeElse:            true
  IndentBraces:          true
  SplitEmptyFunction:    true
  SplitEmptyRecord:      true
  SplitEmptyNamespace:   true
BreakAfterJavaFieldAnnotations: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
BreakStringLiterals: true
CommentPragmas:  '^ IWYU pragma:'
ColumnLimit: 80
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 3
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
  - foreach
  - Q_FOREACH
  - BOOST_FOREACH
IncludeBlocks: Regroup
IncludeCategories: 
  - Regex:           '^"(llvm|llvm-c|clang|clang-c)/'
    Priority:        2
  - Regex:           '^(<|"(gtest|gmock|isl|json)/)'
    Priority:        3
  - Regex:           '.*'
    Priority:        1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 3
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 1000000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpacesInParentheses: true
SpacesInSquareBrackets: true
Standard: Cpp11
TabWidth: 3
UseTab: Never
...

Кто-нибудь знает, как настроить clang-fromat для создания перерыва после

оператор = (

Спасибо!

...