使用clang power tools配置生成的 .clang-format测试版本
点击查看代码
# Format Style Options - Created with Clang Power Tools
---
AccessModifierOffset: -2
AlignConsecutiveAssignments: Consecutive
AlignOperands: AlignAfterOperator
AllowAllConstructorInitializersOnNextLine: false
AllowShortLambdasOnASingleLine: None
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BasedOnStyle: Google
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BeforeLambdaBody: false
BeforeWhile: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BreakInheritanceList: AfterColon
ColumnLimit: 120
ConstructorInitializerAllOnOneLineOrOnePerLine: false
DeriveLineEnding: false
EmptyLineBeforeAccessModifier: Never
FixNamespaceComments: false
IncludeBlocks: Merge
IndentWidth: 4
NamespaceIndentation: All
ObjCBlockIndentWidth: 4
SortUsingDeclarations: false
SpaceAfterTemplateKeyword: false
SpaceBeforeParens: Never
TabWidth: 4
...