叮当声:避免在函数调用中的中断

时间:2019-03-16 16:50:09

标签: arguments clang parameter-passing

这是我的Clang格式文件:

BasedOnStyle: Google
ColumnLimit: 110
BreakBeforeBraces: Custom
BraceWrapping:
  AfterClass:      true
  AfterControlStatement: true
  AfterEnum:       true
  AfterFunction:   true
  AfterStruct:     true
  AfterUnion:      true
  BeforeCatch:     true
  BeforeElse:      true
  SplitEmptyFunction: false
  SplitEmptyRecord: false
  SplitEmptyNamespace: true
IndentWidth: 4
AlignConsecutiveAssignments: true
SortIncludes: true
BinPackArguments: true
BinPackParameters: false
AlignAfterOpenBracket: false
BreakConstructorInitializers: AfterColon
AccessModifierOffset: -4
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowAllParametersOfDeclarationOnNextLine: true

格式化程序确实更喜欢在括号后中断函数调用:

    if (csacalc::StudyUtility::findStudyPropertyIfExists(
            m_metadata.studyProperties(), property.name(), studyProp))

我希望它适合行时在函数名称的行上保留一个参数:

    if (csacalc::StudyUtility::findStudyPropertyIfExists(m_metadata.studyProperties(),
        property.name(), studyProp))

有办法吗?

0 个答案:

没有答案