Skip to content

Commit 96232c7

Browse files
l0kodojeda
authored andcommitted
clang-format: Update to clang-format >= 6
We get new interesting formating with clang-format greater or equal to 6 as stated in the removed comments. Miguel Ojeda suggested to even move the minimal clang-format version to 11, which is the minimum LLVM supported at the moment [1]. Automatically updated with: sed -i 's/^\(\s*\)#\(\S*\s\+\S*\) # Unknown to clang-format.*/\1\2/' .clang-format Link: https://lore.kernel.org/r/CANiq72nLOfmEt-CZBmm2ouEB_x6Jm9ggDVFCVJxYxKw7O0LTzQ@mail.gmail.com [1] Cc: Miguel Ojeda <ojeda@kernel.org> Cc: Tom Rix <trix@redhat.com> Signed-off-by: Mickaël Salaün <mic@digikod.net> Link: https://lore.kernel.org/r/20220506160106.522341-3-mic@digikod.net Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent 49bb63a commit 96232c7

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

.clang-format

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0
22
#
3-
# clang-format configuration file. Intended for clang-format >= 4.
3+
# clang-format configuration file. Intended for clang-format >= 6.
44
#
55
# For more information, see:
66
#
@@ -13,7 +13,7 @@ AccessModifierOffset: -4
1313
AlignAfterOpenBracket: Align
1414
AlignConsecutiveAssignments: false
1515
AlignConsecutiveDeclarations: false
16-
#AlignEscapedNewlines: Left # Unknown to clang-format-4.0
16+
AlignEscapedNewlines: Left
1717
AlignOperands: true
1818
AlignTrailingComments: false
1919
AllowAllParametersOfDeclarationOnNextLine: false
@@ -37,32 +37,32 @@ BraceWrapping:
3737
AfterObjCDeclaration: false
3838
AfterStruct: false
3939
AfterUnion: false
40-
#AfterExternBlock: false # Unknown to clang-format-5.0
40+
AfterExternBlock: false
4141
BeforeCatch: false
4242
BeforeElse: false
4343
IndentBraces: false
44-
#SplitEmptyFunction: true # Unknown to clang-format-4.0
45-
#SplitEmptyRecord: true # Unknown to clang-format-4.0
46-
#SplitEmptyNamespace: true # Unknown to clang-format-4.0
44+
SplitEmptyFunction: true
45+
SplitEmptyRecord: true
46+
SplitEmptyNamespace: true
4747
BreakBeforeBinaryOperators: None
4848
BreakBeforeBraces: Custom
49-
#BreakBeforeInheritanceComma: false # Unknown to clang-format-4.0
49+
BreakBeforeInheritanceComma: false
5050
BreakBeforeTernaryOperators: false
5151
BreakConstructorInitializersBeforeComma: false
52-
#BreakConstructorInitializers: BeforeComma # Unknown to clang-format-4.0
52+
BreakConstructorInitializers: BeforeComma
5353
BreakAfterJavaFieldAnnotations: false
5454
BreakStringLiterals: false
5555
ColumnLimit: 80
5656
CommentPragmas: '^ IWYU pragma:'
57-
#CompactNamespaces: false # Unknown to clang-format-4.0
57+
CompactNamespaces: false
5858
ConstructorInitializerAllOnOneLineOrOnePerLine: false
5959
ConstructorInitializerIndentWidth: 8
6060
ContinuationIndentWidth: 8
6161
Cpp11BracedListStyle: false
6262
DerivePointerAlignment: false
6363
DisableFormat: false
6464
ExperimentalAutoDetectBinPacking: false
65-
#FixNamespaceComments: false # Unknown to clang-format-4.0
65+
FixNamespaceComments: false
6666

6767
# Taken from:
6868
# git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' include/ tools/ \
@@ -627,13 +627,13 @@ ForEachMacros:
627627
- 'xbc_node_for_each_subkey'
628628
- 'zorro_for_each_dev'
629629

630-
#IncludeBlocks: Preserve # Unknown to clang-format-5.0
630+
IncludeBlocks: Preserve
631631
IncludeCategories:
632632
- Regex: '.*'
633633
Priority: 1
634634
IncludeIsMainRegex: '(Test)?$'
635635
IndentCaseLabels: false
636-
#IndentPPDirectives: None # Unknown to clang-format-5.0
636+
IndentPPDirectives: None
637637
IndentWidth: 8
638638
IndentWrappedFunctionNames: false
639639
JavaScriptQuotes: Leave
@@ -643,13 +643,13 @@ MacroBlockBegin: ''
643643
MacroBlockEnd: ''
644644
MaxEmptyLinesToKeep: 1
645645
NamespaceIndentation: None
646-
#ObjCBinPackProtocolList: Auto # Unknown to clang-format-5.0
646+
ObjCBinPackProtocolList: Auto
647647
ObjCBlockIndentWidth: 8
648648
ObjCSpaceAfterProperty: true
649649
ObjCSpaceBeforeProtocolList: true
650650

651651
# Taken from git's rules
652-
#PenaltyBreakAssignment: 10 # Unknown to clang-format-4.0
652+
PenaltyBreakAssignment: 10
653653
PenaltyBreakBeforeFirstCallParameter: 30
654654
PenaltyBreakComment: 10
655655
PenaltyBreakFirstLessLess: 0
@@ -660,14 +660,14 @@ PenaltyReturnTypeOnItsOwnLine: 60
660660
PointerAlignment: Right
661661
ReflowComments: false
662662
SortIncludes: false
663-
#SortUsingDeclarations: false # Unknown to clang-format-4.0
663+
SortUsingDeclarations: false
664664
SpaceAfterCStyleCast: false
665665
SpaceAfterTemplateKeyword: true
666666
SpaceBeforeAssignmentOperators: true
667-
#SpaceBeforeCtorInitializerColon: true # Unknown to clang-format-5.0
668-
#SpaceBeforeInheritanceColon: true # Unknown to clang-format-5.0
667+
SpaceBeforeCtorInitializerColon: true
668+
SpaceBeforeInheritanceColon: true
669669
SpaceBeforeParens: ControlStatements
670-
#SpaceBeforeRangeBasedForLoopColon: true # Unknown to clang-format-5.0
670+
SpaceBeforeRangeBasedForLoopColon: true
671671
SpaceInEmptyParentheses: false
672672
SpacesBeforeTrailingComments: 1
673673
SpacesInAngles: false

0 commit comments

Comments
 (0)