Browse code

root: added .clang-format file

- useful if one want to format the code using clang-format tool from
LLVM

Daniel-Constantin Mierla authored on 16/12/2016 09:41:52
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,95 @@
0
+---
1
+Language:        Cpp
2
+# BasedOnStyle:  LLVM
3
+AccessModifierOffset: -4
4
+AlignAfterOpenBracket: DontAlign
5
+AlignConsecutiveAssignments: false
6
+AlignConsecutiveDeclarations: false
7
+AlignEscapedNewlinesLeft: true
8
+AlignOperands:   true
9
+AlignTrailingComments: true
10
+AllowAllParametersOfDeclarationOnNextLine: true
11
+AllowShortBlocksOnASingleLine: false
12
+AllowShortCaseLabelsOnASingleLine: false
13
+AllowShortFunctionsOnASingleLine: None
14
+AllowShortIfStatementsOnASingleLine: false
15
+AllowShortLoopsOnASingleLine: false
16
+AlwaysBreakAfterDefinitionReturnType: None
17
+AlwaysBreakAfterReturnType: None
18
+AlwaysBreakBeforeMultilineStrings: false
19
+AlwaysBreakTemplateDeclarations: false
20
+BinPackArguments: true
21
+BinPackParameters: true
22
+BraceWrapping:
23
+  AfterClass:      false
24
+  AfterControlStatement: false
25
+  AfterEnum:       false
26
+  AfterFunction:   true
27
+  AfterNamespace:  false
28
+  AfterObjCDeclaration: false
29
+  AfterStruct:     false
30
+  AfterUnion:      false
31
+  BeforeCatch:     false
32
+  BeforeElse:      false
33
+  IndentBraces:    false
34
+BreakBeforeBinaryOperators: NonAssignment
35
+BreakBeforeBraces: Mozilla
36
+BreakBeforeTernaryOperators: true
37
+BreakConstructorInitializersBeforeComma: false
38
+BreakAfterJavaFieldAnnotations: false
39
+BreakStringLiterals: true
40
+ColumnLimit:     80
41
+CommentPragmas:  '^ IWYU pragma:'
42
+ConstructorInitializerAllOnOneLineOrOnePerLine: false
43
+ConstructorInitializerIndentWidth: 4
44
+ContinuationIndentWidth: 8
45
+Cpp11BracedListStyle: true
46
+DerivePointerAlignment: false
47
+DisableFormat:   false
48
+ExperimentalAutoDetectBinPacking: false
49
+ForEachMacros:   [ foreach, Q_FOREACH, BOOST_FOREACH ]
50
+IncludeCategories:
51
+  - Regex:           '^"(llvm|llvm-c|clang|clang-c)/'
52
+    Priority:        2
53
+  - Regex:           '^(<|"(gtest|isl|json)/)'
54
+    Priority:        3
55
+  - Regex:           '.*'
56
+    Priority:        1
57
+IncludeIsMainRegex: '$'
58
+IndentCaseLabels: true
59
+IndentWidth:     4
60
+IndentWrappedFunctionNames: false
61
+JavaScriptQuotes: Leave
62
+JavaScriptWrapImports: true
63
+KeepEmptyLinesAtTheStartOfBlocks: true
64
+MacroBlockBegin: ''
65
+MacroBlockEnd:   ''
66
+MaxEmptyLinesToKeep: 2
67
+NamespaceIndentation: None
68
+ObjCBlockIndentWidth: 4
69
+ObjCSpaceAfterProperty: false
70
+ObjCSpaceBeforeProtocolList: true
71
+PenaltyBreakBeforeFirstCallParameter: 19
72
+PenaltyBreakComment: 300
73
+PenaltyBreakFirstLessLess: 120
74
+PenaltyBreakString: 1000
75
+PenaltyExcessCharacter: 1000000
76
+PenaltyReturnTypeOnItsOwnLine: 60
77
+PointerAlignment: Right
78
+ReflowComments:  false
79
+SortIncludes:    false
80
+SpaceAfterCStyleCast: false
81
+SpaceBeforeAssignmentOperators: true
82
+SpaceBeforeParens: Never
83
+SpaceInEmptyParentheses: false
84
+SpacesBeforeTrailingComments: 1
85
+SpacesInAngles:  false
86
+SpacesInContainerLiterals: true
87
+SpacesInCStyleCastParentheses: false
88
+SpacesInParentheses: false
89
+SpacesInSquareBrackets: false
90
+Standard:        Cpp11
91
+TabWidth:        4
92
+UseTab:          Always
93
+...
94
+