Skip to content

Commit 8fae17e

Browse files
committed
clang-format.bash: update to clang-format-6.0
Update `.clang-format` with configuration to make the 6.0 format as close as possible to what 3.8 produced before. Then revise the style to indent preprocessor directives (a feature new since 3.8).
1 parent 6b3d3f9 commit 8fae17e

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

.clang-format

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
---
2-
# This configuration requires clang-format 3.8 or higher.
2+
# This configuration requires clang-format version 6.0 exactly.
33
BasedOnStyle: Mozilla
44
AlignOperands: false
5-
AlwaysBreakAfterReturnType: None
5+
AllowShortFunctionsOnASingleLine: InlineOnly
66
AlwaysBreakAfterDefinitionReturnType: None
7+
AlwaysBreakAfterReturnType: None
8+
BinPackArguments: true
9+
BinPackParameters: true
10+
BraceWrapping:
11+
AfterClass: true
12+
AfterEnum: true
13+
AfterFunction: true
14+
AfterStruct: true
15+
AfterUnion: true
16+
BreakBeforeBraces: Custom
717
ColumnLimit: 79
8-
Standard: Cpp11
18+
IndentPPDirectives: AfterHash
19+
SortUsingDeclarations: false
20+
SpaceAfterTemplateKeyword: true
921
...

src/clang-format.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ test "$#" = 0 || die "$usage"
7878

7979
# Find a default tool.
8080
tools='
81+
clang-format-6.0
8182
clang-format
82-
clang-format-3.8
8383
'
8484
if test "x$clang_format" = "x"; then
8585
for tool in $tools; do

0 commit comments

Comments
 (0)