From 21c47514da5cc855a3d2dd9bd4d76e80bb9e740f Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Fri, 27 May 2016 17:45:00 +0200 Subject: [PATCH] Update clang-format to 3.8 --- .clang-format | 82 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 59 insertions(+), 23 deletions(-) diff --git a/.clang-format b/.clang-format index f5577f5de..285ed38ba 100644 --- a/.clang-format +++ b/.clang-format @@ -2,53 +2,89 @@ Language: Cpp # BasedOnStyle: LLVM AccessModifierOffset: -2 -ConstructorInitializerIndentWidth: 4 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false AlignEscapedNewlinesLeft: false +AlignOperands: true AlignTrailingComments: true AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: true +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: All AllowShortIfStatementsOnASingleLine: false AllowShortLoopsOnASingleLine: false -AllowShortFunctionsOnASingleLine: true -AlwaysBreakTemplateDeclarations: false +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: false +BinPackArguments: false +BinPackParameters: false +BraceWrapping: + AfterClass: true + AfterControlStatement: true + AfterEnum: true + AfterFunction: true + AfterNamespace: true + AfterObjCDeclaration: true + AfterStruct: true + AfterUnion: true + BeforeCatch: true + BeforeElse: true + IndentBraces: true BreakBeforeBinaryOperators: false +BreakBeforeBraces: Allman BreakBeforeTernaryOperators: true BreakConstructorInitializersBeforeComma: false -BinPackParameters: false ColumnLimit: 100 +CommentPragmas: '^ IWYU pragma:' ConstructorInitializerAllOnOneLineOrOnePerLine: false -DerivePointerBinding: false +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DerivePointerAlignment: false +DisableFormat: false ExperimentalAutoDetectBinPacking: false +ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] +IncludeCategories: + - Regex: '^<' + Priority: 3 + - Regex: '^"(osrm|util|engine|extract|contract)/' + Priority: 2 + - Regex: '.*' + Priority: 1 IndentCaseLabels: false -MaxEmptyLinesToKeep: 1 +IndentWidth: 4 +IndentWrappedFunctionNames: false KeepEmptyLinesAtTheStartOfBlocks: true +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 1 NamespaceIndentation: None +ObjCBlockIndentWidth: 2 ObjCSpaceAfterProperty: false ObjCSpaceBeforeProtocolList: true PenaltyBreakBeforeFirstCallParameter: 19 PenaltyBreakComment: 300 -PenaltyBreakString: 1000 PenaltyBreakFirstLessLess: 120 -PenaltyExcessCharacter: 1000 +PenaltyBreakString: 1000 +PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 60 -PointerBindsToType: false +PointerAlignment: Right +ReflowComments: true +SortIncludes: true +SpaceAfterCStyleCast: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 1 -Cpp11BracedListStyle: true +SpacesInAngles: false +SpacesInContainerLiterals: true +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false Standard: Cpp11 -IndentWidth: 4 TabWidth: 8 UseTab: Never -BreakBeforeBraces: Allman -IndentFunctionDeclarationAfterType: false -SpacesInParentheses: false -SpacesInAngles: false -SpaceInEmptyParentheses: false -SpacesInCStyleCastParentheses: false -SpacesInContainerLiterals: true -SpaceBeforeAssignmentOperators: true -ContinuationIndentWidth: 4 -CommentPragmas: '^ IWYU pragma:' -ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] -SpaceBeforeParens: ControlStatements ...