diff options
author | Rechi <Rechi@users.noreply.github.com> | 2019-05-28 16:55:49 +0200 |
---|---|---|
committer | Rechi <Rechi@users.noreply.github.com> | 2019-05-28 16:55:49 +0200 |
commit | 9cf98ee7d40554642024c3f9550e3eece209403f (patch) | |
tree | 0f0a99d5bfc6f44317f2b96cb3cd2bf657c625f7 /.clang-format | |
parent | 2026ece12b76864978c6fea35ff666fe9cc1504c (diff) |
update clang-format
- support Objective-C
- do not align backslashes in escaped lines
- do not align trailing comments
- put short functions into a single line if they are inside a class block
- indent constructor initializer lists and inheritance lists with two spaces
- allow two empty lines
Diffstat (limited to '.clang-format')
-rw-r--r-- | .clang-format | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/.clang-format b/.clang-format index 10cea17e8d..3105501dd1 100644 --- a/.clang-format +++ b/.clang-format @@ -1,17 +1,16 @@ --- -Language: Cpp # BasedOnStyle: LLVM AccessModifierOffset: -2 AlignAfterOpenBracket: Align AlignConsecutiveAssignments: false AlignConsecutiveDeclarations: false -AlignEscapedNewlinesLeft: false +AlignEscapedNewlines: DontAlign AlignOperands: true -AlignTrailingComments: true +AlignTrailingComments: false AllowAllParametersOfDeclarationOnNextLine: true AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: None +AllowShortFunctionsOnASingleLine: InlineOnly AllowShortIfStatementsOnASingleLine: false AllowShortLoopsOnASingleLine: false AlwaysBreakAfterDefinitionReturnType: None @@ -29,7 +28,7 @@ BreakStringLiterals: true ColumnLimit: 100 CommentPragmas: '^ IWYU pragma:' ConstructorInitializerAllOnOneLineOrOnePerLine: false -ConstructorInitializerIndentWidth: 4 +ConstructorInitializerIndentWidth: 2 ContinuationIndentWidth: 4 Cpp11BracedListStyle: true DerivePointerAlignment: false @@ -52,7 +51,7 @@ JavaScriptWrapImports: true KeepEmptyLinesAtTheStartOfBlocks: true MacroBlockBegin: '' MacroBlockEnd: '' -MaxEmptyLinesToKeep: 1 +MaxEmptyLinesToKeep: 2 NamespaceIndentation: None ObjCBlockIndentWidth: 2 ObjCSpaceAfterProperty: false @@ -81,4 +80,3 @@ Standard: Cpp11 TabWidth: 8 UseTab: Never ... - |