# Copyright (C) 2015 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Modified from gcc's clang-format config. # clang-format 7.0.1 is required # # To utilize the tool to lines just touched by a patch, use # clang-format-diff script that is usually also packaged with clang-format. # # Example of usage: # git diff -U0 --no-color | clang-format-diff -p1 # (here the tool will generate a patch) # git diff -U0 --no-color | clang-format-diff -p1 -i # (modifications are applied) --- AccessModifierOffset: -2 AlwaysBreakAfterReturnType: TopLevel AlignConsecutiveDeclarations: true BinPackArguments: true BinPackParameters: true BreakBeforeBinaryOperators: All BreakBeforeBraces: Custom # Newer clang-format has BS_GNU BraceWrapping: AfterClass: true AfterControlStatement: true AfterEnum: true AfterFunction: true AfterNamespace: false AfterObjCDeclaration: true AfterStruct: true AfterUnion: true BeforeCatch: true BeforeElse: true IndentBraces: true SplitEmptyFunction: false BreakBeforeTernaryOperators: true ColumnLimit: 80 ConstructorInitializerIndentWidth: 2 ContinuationIndentWidth: 2 ObjCBlockIndentWidth: 2 ObjCSpaceAfterProperty: true ObjCSpaceBeforeProtocolList: true ForEachMacros: [] IndentCaseLabels: false NamespaceIndentation: None PenaltyBreakBeforeFirstCallParameter: 100 DerivePointerAlignment: false PointerAlignment: Right SortIncludes: false SpaceAfterCStyleCast: true SpaceBeforeParens: ControlStatements SpacesBeforeTrailingComments: 1 AlignEscapedNewlines: Right AlignTrailingComments: true AllowShortFunctionsOnASingleLine: All AlwaysBreakTemplateDeclarations: MultiLine KeepEmptyLinesAtTheStartOfBlocks: false # TODO # MacroBlockBegin: # MacroBlockEnd: